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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 19 14:57:42 EDT 2011


Author: martinl
Date: 2011-10-19 11:57:42 -0700 (Wed, 19 Oct 2011)
New Revision: 48856

Modified:
   grass/trunk/gui/wxpython/gui_modules/menuform.py
Log:
wxGUI: fix GNotebook.SetSelectionByName()
       (merge r48855 from devbr6)


Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2011-10-19 18:55:55 UTC (rev 48855)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2011-10-19 18:57:42 UTC (rev 48856)
@@ -2105,8 +2105,9 @@
         
         @param page names, eg. 'layers', 'output', 'search', 'pyshell', 'nviz'
         """
-        if self.GetSelection() != self.GetPageIndexByName('output'):
-            self.SetSelection(self.GetPageIndexByName(page))
+        idx = self.GetPageIndexByName(page)
+        if self.GetSelection() != idx:
+            self.SetSelection(idx)
         
     def GetPageIndexByName(self, page):
         """!Get notebook page index



More information about the grass-commit mailing list