[GRASS-SVN] r46535 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 3 05:16:17 EDT 2011


Author: martinl
Date: 2011-06-03 02:16:17 -0700 (Fri, 03 Jun 2011)
New Revision: 46535

Modified:
   grass/trunk/gui/wxpython/gui_modules/layertree.py
   grass/trunk/gui/wxpython/gui_modules/mapdisp.py
   grass/trunk/gui/wxpython/gui_modules/toolbars.py
Log:
wxGUI: fix r46534


Modified: grass/trunk/gui/wxpython/gui_modules/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/layertree.py	2011-06-03 09:08:46 UTC (rev 46534)
+++ grass/trunk/gui/wxpython/gui_modules/layertree.py	2011-06-03 09:16:17 UTC (rev 46535)
@@ -668,7 +668,7 @@
 
         @todo vector/volume
         """
-        self.lmgr.SetNBPage('nviz')
+        self.lmgr.notebook.SetSelectionByName('nviz')
         ltype = self.GetPyData(self.layer_selected)[0]['type']
         if ltype == 'raster':
             self.lmgr.nviz.SetPage('surface')

Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2011-06-03 09:08:46 UTC (rev 46534)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2011-06-03 09:16:17 UTC (rev 46535)
@@ -1229,7 +1229,7 @@
         """!Internal method used by OnQuery*() methods"""
         if self.toolbars['map'].GetAction() == 'displayAttrb':
             # switch to output console to show query results
-            self._layerManager.SetNBPage('console')
+            self._layerManager.notebook.SetSelectionByName('console')
         
         self.MapWindow.mouse['box'] = "point"
         self.MapWindow.zoomtype = 0
@@ -1624,7 +1624,7 @@
         self.totaldist = 0.0 # total measured distance
         
         # switch Layer Manager to output console to show measure results
-        self._layerManager.SetNBPage('console')
+        self._layerManager.notebook.SetSelectionByName('console')
         
         # change mouse to draw line for measurement
         self.MapWindow.mouse['use'] = "measure"
@@ -1665,8 +1665,9 @@
         """!Calculate map distance from screen distance
         and print to output window
         """
-        if self._layerManager.notebook.GetSelection() != self._layerManager.GetNBPageIndex('console'):
-            self._layerManager.SetNBPage('console')
+        if self._layerManager.notebook.GetSelection() != \
+                self._layerManager.notebook.GetPageIndexByName('console'):
+            self._layerManager.notebook.SetSelectionByName('console')
         
         dist, (north, east) = self.MapWindow.Distance(beginpt, endpt)
         

Modified: grass/trunk/gui/wxpython/gui_modules/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/toolbars.py	2011-06-03 09:08:46 UTC (rev 46534)
+++ grass/trunk/gui/wxpython/gui_modules/toolbars.py	2011-06-03 09:16:17 UTC (rev 46535)
@@ -1212,7 +1212,7 @@
             lmgr = self.parent.GetLayerManager()
             if lmgr:
                 lmgr.toolbars['tools'].Enable('vdigit', enable = True)
-                lmgr.SetNBPage('console')
+                lmgr.notebook.SetSelectionByName('console')
             self.digit.CloseMap()
             if lmgr:
                 lmgr.GetLogWindow().GetProgressBar().SetValue(0)
@@ -1404,7 +1404,7 @@
             event.Skip()
             return
         
-        self.lmgr.SetNBPage('nviz')
+        self.lmgr.notebook.SetSelectionByName('nviz')
         eId = event.GetId()
         if eId == self.view:
             self.lmgr.nviz.SetPage('view')
@@ -1447,7 +1447,7 @@
         self.parent.MapWindow.polycoords = []
         
         # return to map layer page (gets rid of ugly exit bug)
-        self.lmgr.SetNBPage('layers')
+        self.lmgr.notebook.SetSelectionByName('layers')
 
         # disable the toolbar
         self.parent.RemoveToolbar("nviz")



More information about the grass-commit mailing list