[GRASS-SVN] r46729 - in grass/trunk/gui/wxpython: . gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Jun 17 17:07:09 EDT 2011
Author: martinl
Date: 2011-06-17 14:07:09 -0700 (Fri, 17 Jun 2011)
New Revision: 46729
Modified:
grass/trunk/gui/wxpython/gui_modules/menuform.py
grass/trunk/gui/wxpython/wxgui.py
Log:
wxNviz: insert 'nviz page' after 'layers'
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-06-17 20:10:37 UTC (rev 46728)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2011-06-17 21:07:09 UTC (rev 46729)
@@ -2410,13 +2410,21 @@
self.notebookPages = {}
def AddPage(self, **kwargs):
- """!Add a page
+ """!Add a new page
"""
if 'name' in kwargs:
self.notebookPages[kwargs['name']] = kwargs['page']
del kwargs['name']
super(GNotebook, self).AddPage(**kwargs)
+ def InsertPage(self, **kwargs):
+ """!Insert a new page
+ """
+ if 'name' in kwargs:
+ self.notebookPages[kwargs['name']] = kwargs['page']
+ del kwargs['name']
+ super(GNotebook, self).InsertPage(**kwargs)
+
def SetSelectionByName(self, page):
"""!Set notebook
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2011-06-17 20:10:37 UTC (rev 46728)
+++ grass/trunk/gui/wxpython/wxgui.py 2011-06-17 21:07:09 UTC (rev 46729)
@@ -276,7 +276,8 @@
Debug.msg(5, "GMFrame.AddNviz(): begin")
self.nviz = nviz_tools.NvizToolWindow(parent = self,
display = self.curr_page.maptree.GetMapDisplay())
- self.notebook.AddPage(page = self.nviz, text = _("3D view"), name = 'nviz')
+ idx = self.notebook.GetPageIndexByName('layers')
+ self.notebook.InsertPage(indx = idx + 1, page = self.nviz, text = _("3D view"), name = 'nviz')
self.notebook.SetSelectionByName('nviz')
self.existNviz = True
Debug.msg(5, "GMFrame.AddNviz(): end")
More information about the grass-commit
mailing list