Skip to content

Commit

Permalink
wxGUI: fix calling SpinCtrl.SetRange with floats with newer Python (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
petrasovaa committed Dec 21, 2022
1 parent d645f27 commit 23dd68b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gui/wxpython/gui_core/wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,12 @@ def SetToolTip(self, tip):
else:
wx.SpinCtrl.SetToolTipString(self, tip)

def SetRange(self, minVal, maxVal):
wx.SpinCtrl.SetRange(self, int(minVal), int(maxVal))

def SetValue(self, value):
wx.SpinCtrl.SetValue(self, int(value))


class FloatSpin(fs.FloatSpin):
"""Wrapper around fs.FloatSpin to have more control
Expand Down

0 comments on commit 23dd68b

Please sign in to comment.