belangeo / pyo

Python DSP module
GNU Lesser General Public License v3.0
1.32k stars 132 forks source link

Wxpython 4.2.0 issue found by usage of Spectrum() #256

Closed Bibiko closed 1 year ago

Bibiko commented 1 year ago

It's related to issue #251 for class RangeSlider and class HRangeSlider in pyo/lib/_wxwidgets.py. Any arg of a rect init have to be integers.

Fix (line numbers): 805 old: midrec = wx.Rect(self.middle - 7, 4, 15, size[1] - 9) 805 new: midrec = wx.Rect(int(self.middle - 7), 4, 15, size[1] - 9)

943 old: dc.DrawRoundedRectangle(rec[0], rec[1], rec[2], rec[3], 4) 943 new: dc.DrawRoundedRectangle(rec[0], rec[1], int(rec[2]), rec[3], 4)

949 old: dc.DrawRoundedRectangle(rec[0], rec[1], rec[2], rec[3], 3) 949 new: dc.DrawRoundedRectangle(int(rec[0]), rec[1], rec[2], rec[3], 3)

Bibiko commented 1 year ago

it seems safer to enclose all args with int()

belangeo commented 1 year ago

Done! I'm not on MacOS, but pretty confident it's fixed!

Bibiko commented 1 year ago

Thanks!!!