microscope-cockpit / cockpit

Cockpit is a microscope graphical user interface. It is a flexible and easy to extend platform aimed at life scientists using bespoke microscopes.
https://microscope-cockpit.org
GNU General Public License v3.0
37 stars 27 forks source link

issue with touchscreen wx.Size call #825

Closed iandobbie closed 2 years ago

iandobbie commented 2 years ago

My machine has recently been upgraded to wx 4.2.0 osx-cocoa (phoenix) wxWidgets 3.2.0 and cockpit now bombs on startup with:

Traceback (most recent call last): File "/Users/ID/src/cockpit/cockpit/init.py", line 193, in OnInit module.makeWindow(main_window) File "/Users/ID/src/cockpit/cockpit/gui/touchscreen.py", line 1834, in makeWindow TouchScreenWindow(parent, title="Touch Screen view") File "/Users/ID/src/cockpit/cockpit/gui/touchscreen.py", line 1816, in init self._do_layout() File "/Users/ID/src/cockpit/cockpit/gui/touchscreen.py", line 1826, in _do_layout sizer.Add(ImagePreviewPanel(self), 0, wx.EXPAND) File "/Users/ID/src/cockpit/cockpit/gui/touchscreen.py", line 1586, in init self._do_layout() File "/Users/ID/src/cockpit/cockpit/gui/touchscreen.py", line 1606, in _do_layout self.resetGrid() File "/Users/ID/src/cockpit/cockpit/gui/touchscreen.py", line 1670, in resetGrid view.change_size(wx.Size(new_width, new_height)) TypeError: Size(): arguments did not match any overloaded call: overload 1: too many arguments overload 2: argument 2 has unexpected type 'float' overload 3: argument 1 has unexpected type 'int'

I solved this with an int cast in the line calculating new_height

iandobbie commented 2 years ago

fixed in master branch with commit 5e23f7f