[GRASS-SVN] r63936 - in grass/trunk/gui/wxpython: gui_core mapdisp

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jan 2 17:43:55 PST 2015


Author: annakrat
Date: 2015-01-02 17:43:55 -0800 (Fri, 02 Jan 2015)
New Revision: 63936

Modified:
   grass/trunk/gui/wxpython/gui_core/mapdisp.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxGUI: fix toolbars problem - #2523 and raster digitizer must be destroyed not just hidden

Modified: grass/trunk/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapdisp.py	2015-01-02 18:32:53 UTC (rev 63935)
+++ grass/trunk/gui/wxpython/gui_core/mapdisp.py	2015-01-03 01:43:55 UTC (rev 63936)
@@ -269,17 +269,15 @@
     def GetMapToolbar(self):
         """Returns toolbar with zooming tools"""
         raise NotImplementedError("GetMapToolbar")
-       
+
     def GetToolbar(self, name):
-        """Returns toolbar if exists else None.
-        
-        Toolbars dictionary contains currently used toolbars only.
+        """Returns toolbar if exists and is active, else None.
         """
-        if name in self.toolbars:
+        if name in self.toolbars and self.toolbars[name].IsShown():
             return self.toolbars[name]
-        
+
         return None
-       
+
     def StatusbarUpdate(self):
         """Update statusbar content"""
         if self.statusbarManager:

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2015-01-02 18:32:53 UTC (rev 63935)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2015-01-03 01:43:55 UTC (rev 63936)
@@ -1506,5 +1506,5 @@
         self.GetMap().layerRemoved.disconnect(self._updateRDigitLayers)
         self.GetMap().layerChanged.disconnect(self._updateRDigitLayers)
 
-        self.RemoveToolbar('rdigit')
+        self.RemoveToolbar('rdigit', destroy=True)
         self.rdigit = None



More information about the grass-commit mailing list