[GRASS-SVN] r72793 - in grass/trunk/gui/wxpython: mapdisp rdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jun 9 18:22:35 PDT 2018


Author: annakrat
Date: 2018-06-09 18:22:35 -0700 (Sat, 09 Jun 2018)
New Revision: 72793

Modified:
   grass/trunk/gui/wxpython/mapdisp/frame.py
   grass/trunk/gui/wxpython/rdigit/toolbars.py
Log:
wxGUI/rdigit: fix raster digitizer toolbar on mac

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2018-06-10 00:40:48 UTC (rev 72792)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2018-06-10 01:22:35 UTC (rev 72793)
@@ -1557,6 +1557,7 @@
         self.GetMap().layerAdded.disconnect(self._updateRDigitLayers)
         self.GetMap().layerRemoved.disconnect(self._updateRDigitLayers)
         self.GetMap().layerChanged.disconnect(self._updateRDigitLayers)
+        self._toolSwitcher.toggleToolChanged.disconnect(self.toolbars['rdigit'].CheckSelectedTool)
 
         self.RemoveToolbar('rdigit', destroy=True)
         self.rdigit = None

Modified: grass/trunk/gui/wxpython/rdigit/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/rdigit/toolbars.py	2018-06-10 00:40:48 UTC (rev 72792)
+++ grass/trunk/gui/wxpython/rdigit/toolbars.py	2018-06-10 01:22:35 UTC (rev 72793)
@@ -82,10 +82,8 @@
                               lambda evt: self._cellValueChanged())
         self._valueCombo.SetSelection(0)
         self._cellValueChanged()
-        self.InsertControl(
-            6, wx.StaticText(
-                self, label=" %s" %
-                _("Cell value:")))
+        labelValue = wx.StaticText(self, label=" %s" % _("Cell value:"))
+        self.InsertControl(6, labelValue)
         self.InsertControl(7, self._valueCombo)
 
         self._widthValueId = wx.NewId()
@@ -99,7 +97,8 @@
         self._widthValueChanged()
         self._widthValue.SetToolTipString(
             _("Width of currently digitized line or diameter of a digitized point in map units."))
-        self.InsertControl(8, wx.StaticText(self, label=" %s" % _("Width:")))
+        labelWidth = wx.StaticText(self, label=" %s" % _("Width:"))
+        self.InsertControl(8, labelWidth)
         self.InsertControl(9, self._widthValue)
 
         for tool in (self.area, self.line, self.point):
@@ -109,6 +108,11 @@
         self._default = self.area
         # realize the toolbar
         self.Realize()
+        # workaround Mac bug
+        for t in (self._mapSelectionCombo, self._color, self._valueCombo,
+                  self._widthValue, labelValue, labelWidth):
+            t.Hide()
+            t.Show()
 
     def _toolbarData(self):
         """Toolbar data"""



More information about the grass-commit mailing list