[GRASS-SVN] r72854 - in grass/branches/releasebranch_7_4/gui/wxpython: mapdisp rdigit

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 17 12:49:39 PDT 2018


Author: annakrat
Date: 2018-06-17 12:49:39 -0700 (Sun, 17 Jun 2018)
New Revision: 72854

Modified:
   grass/branches/releasebranch_7_4/gui/wxpython/mapdisp/frame.py
   grass/branches/releasebranch_7_4/gui/wxpython/rdigit/toolbars.py
Log:
wxGUI/rdigit: fix raster digitizer toolbar on mac (merge from trunk, see #3151)

Modified: grass/branches/releasebranch_7_4/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/branches/releasebranch_7_4/gui/wxpython/mapdisp/frame.py	2018-06-16 08:50:12 UTC (rev 72853)
+++ grass/branches/releasebranch_7_4/gui/wxpython/mapdisp/frame.py	2018-06-17 19:49:39 UTC (rev 72854)
@@ -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/branches/releasebranch_7_4/gui/wxpython/rdigit/toolbars.py
===================================================================
--- grass/branches/releasebranch_7_4/gui/wxpython/rdigit/toolbars.py	2018-06-16 08:50:12 UTC (rev 72853)
+++ grass/branches/releasebranch_7_4/gui/wxpython/rdigit/toolbars.py	2018-06-17 19:49:39 UTC (rev 72854)
@@ -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