From 8f3098a599d6a2fa43141c601fe9fe584d310807 Mon Sep 17 00:00:00 2001 From: Anna Petrasova Date: Wed, 21 Dec 2022 16:04:16 -0500 Subject: [PATCH] wxGUI: fix calling SpinCtrl.SetRange with floats with newer Python (#2687) --- gui/wxpython/gui_core/wrap.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gui/wxpython/gui_core/wrap.py b/gui/wxpython/gui_core/wrap.py index 325be0cf2bf..941e2789039 100644 --- a/gui/wxpython/gui_core/wrap.py +++ b/gui/wxpython/gui_core/wrap.py @@ -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