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

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Aug 5 14:02:52 PDT 2013


Author: annakrat
Date: 2013-08-05 14:02:52 -0700 (Mon, 05 Aug 2013)
New Revision: 57422

Modified:
   grass/trunk/gui/wxpython/gui_core/dialogs.py
   grass/trunk/gui/wxpython/mapdisp/frame.py
Log:
wxNviz: fix minor issues with legend overlay

Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py	2013-08-05 20:56:31 UTC (rev 57421)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py	2013-08-05 21:02:52 UTC (rev 57422)
@@ -614,9 +614,7 @@
         if found:
             # enable 'OK' and 'Resize' button
             self.btnOK.Enable()
-            if not self.parent.IsPaneShown('3d'):
-                self.resizeBtn.Enable()
-            
+
             # set title
             self.SetTitle(_('Legend of raster map <%s>') % \
                               mapName)
@@ -705,7 +703,11 @@
             if self._ddstyle == DECOR_DIALOG_LEGEND and not self.parent.IsPaneShown('3d'):
                 self.resizeBtn.Enable()
 
-
+    def Show(self, show=True):
+        if show:
+            self.resizeBtn.Enable(not self.parent.IsPaneShown('3d'))
+        wx.Dialog.Show(self, show)
+        
 class TextLayerDialog(wx.Dialog):
     """
     Controls setting options and displaying/hiding map overlay decorations

Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py	2013-08-05 20:56:31 UTC (rev 57421)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py	2013-08-05 21:02:52 UTC (rev 57422)
@@ -365,6 +365,8 @@
             for page in ('view', 'light', 'fringe', 'constant', 'cplane', 'animation'):
                 self._layerManager.nviz.UpdatePage(page)
                 
+        self._giface.updateMap.disconnect(self.MapWindow2D.UpdateMap)
+        self._giface.updateMap.connect(self.MapWindow3D.UpdateMap)
         self.MapWindow3D.overlays = self.MapWindow2D.overlays
         self.MapWindow3D.textdict = self.MapWindow2D.textdict
         # update overlays needs to be called after because getClientSize
@@ -403,6 +405,9 @@
             self.MapWindow2D.textdict = self.MapWindow3D.textdict
         except AttributeError:
             pass
+        self._giface.updateMap.disconnect(self.MapWindow3D.UpdateMap)
+        self._giface.updateMap.connect(self.MapWindow2D.UpdateMap)
+
         self.MapWindow.UpdateMap()
         self._mgr.Update()
         



More information about the grass-commit mailing list