Ver código fonte

wxGUI: fix GNotebook.SetSelectionByName()
(merge https://trac.osgeo.org/grass/changeset/48855 from devbr6)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@48856 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 13 anos atrás
pai
commit
329864c978
1 arquivos alterados com 3 adições e 2 exclusões
  1. 3 2
      gui/wxpython/gui_modules/menuform.py

+ 3 - 2
gui/wxpython/gui_modules/menuform.py

@@ -2105,8 +2105,9 @@ class GNotebook(FN.FlatNotebook):
         
         @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