[GRASS-SVN] r48857 - grass/branches/releasebranch_6_4/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Oct 19 14:59:06 EDT 2011


Author: martinl
Date: 2011-10-19 11:59:06 -0700 (Wed, 19 Oct 2011)
New Revision: 48857

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


Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py	2011-10-19 18:57:42 UTC (rev 48856)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/menuform.py	2011-10-19 18:59:06 UTC (rev 48857)
@@ -1913,8 +1913,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