Missing required explicit float->int type casting

"therange" variable, used to adjust range of the KnobCtrl, must be an integer.
This commit is contained in:
PChemGuy
2022-09-03 16:31:12 +03:00
parent 7c4d21d778
commit 83dba91a2b

View File

@@ -140,7 +140,7 @@ class KnobCtrlDemo(wx.Panel):
minvalue = self.knob1.GetMinValue()
maxvalue = self.knob1.GetMaxValue()
therange = (maxvalue-minvalue)/(event.GetPosition()-1)
therange = int((maxvalue-minvalue)/(event.GetPosition()-1))
tickrange = range(minvalue, maxvalue+1, therange)
self.knob1.SetTags(tickrange)