[GRASS-SVN] r73552 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Oct 15 07:09:14 PDT 2018
Author: annakrat
Date: 2018-10-15 07:09:14 -0700 (Mon, 15 Oct 2018)
New Revision: 73552
Modified:
grass/trunk/gui/wxpython/gui_core/gselect.py
grass/trunk/gui/wxpython/gui_core/wrap.py
Log:
wxGUI: fix for wxPython 4, see #3681
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2018-10-15 11:21:59 UTC (rev 73551)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2018-10-15 14:09:14 UTC (rev 73552)
@@ -79,7 +79,7 @@
from core.debug import Debug
from gui_core.vselect import VectorSelectBase
from gui_core.wrap import TreeCtrl, Button, StaticText, StaticBox, \
- TextCtrl
+ TextCtrl, Panel
from grass.pydispatch.signal import Signal
@@ -2368,7 +2368,7 @@
return 'boundary'
-class CoordinatesSelect(wx.Panel):
+class CoordinatesSelect(Panel):
def __init__(self, parent, giface, multiple=False, **kwargs):
"""Widget to get coordinates from map window by mouse click
Modified: grass/trunk/gui/wxpython/gui_core/wrap.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/wrap.py 2018-10-15 11:21:59 UTC (rev 73551)
+++ grass/trunk/gui/wxpython/gui_core/wrap.py 2018-10-15 14:09:14 UTC (rev 73552)
@@ -74,6 +74,19 @@
wx.Window.SetToolTipString(self, tip)
+class Panel(wx.Panel):
+ """Wrapper around wx.Panel to have more control
+ over the widget on different platforms/wxpython versions"""
+ def __init__(self, *args, **kwargs):
+ wx.Panel.__init__(self, *args, **kwargs)
+
+ def SetToolTip(self, tip):
+ if wxPythonPhoenix:
+ wx.Panel.SetToolTip(self, tipString=tip)
+ else:
+ wx.Panel.SetToolTipString(self, tip)
+
+
class SpinCtrl(wx.SpinCtrl):
"""Wrapper around wx.SpinCtrl to have more control
over the widget on different platforms"""
More information about the grass-commit
mailing list