belangeo / pyo

Python DSP module

Home Page:http://ajaxsoundstudio.com/software/pyo/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wxpython 4.2.0 issue found by usage of Spectrum()

Bibiko opened this issue · comments

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)

it seems safer to enclose all args with int()

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

Thanks!!!