瀏覽代碼

wxGUI: fix https://trac.osgeo.org/grass/changeset/46534

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46535 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 年之前
父節點
當前提交
d034a9a32e
共有 3 個文件被更改,包括 9 次插入8 次删除
  1. 1 1
      gui/wxpython/gui_modules/layertree.py
  2. 5 4
      gui/wxpython/gui_modules/mapdisp.py
  3. 3 3
      gui/wxpython/gui_modules/toolbars.py

+ 1 - 1
gui/wxpython/gui_modules/layertree.py

@@ -668,7 +668,7 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
 
         @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')

+ 5 - 4
gui/wxpython/gui_modules/mapdisp.py

@@ -1229,7 +1229,7 @@ class MapFrame(wx.Frame):
         """!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 @@ class MapFrame(wx.Frame):
         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 @@ class MapFrame(wx.Frame):
         """!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)
         

+ 3 - 3
gui/wxpython/gui_modules/toolbars.py

@@ -1212,7 +1212,7 @@ class VDigitToolbar(AbstractToolbar):
             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 @@ class NvizToolbar(AbstractToolbar):
             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 @@ class NvizToolbar(AbstractToolbar):
         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")