victordiaz / PHONK

PHONK is a coding playground for new and old Android devices
https://phonk.app
GNU General Public License v3.0
456 stars 27 forks source link

Knob `decimals()` method has no effect #66

Closed Jakoma02 closed 3 years ago

Jakoma02 commented 3 years ago

It seems to me that the decimals() method of a knob has no effect (as opposed to changing the number of displayed decimal places). The bug can be easily reproduced by using the method with any argument other than 2.

I believe that the problem lies in the PKnob java class, where the formatString is only used in the constructor to create a DecimalFormat instance df that is later used when drawing the knob. As the decimals() method only changes formatString, df never gets updated and the change has no effect.

Sorry if the mistake is on my side, I could have easily overlooked something.

victordiaz commented 3 years ago

Hello @Jakoma02 You are totally right, thanks for letting me know. I'm fixing it ASAP and include it in tonight's release :)

victordiaz commented 3 years ago

@Jakoma02 the new version is uploaded and should be online soon, feel free to try it and let me know if it works as expected. Thanks

victordiaz commented 3 years ago

I close this issue since it is resolved