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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 8 00:40:06 EST 2009


Author: cmbarton
Date: 2009-03-08 00:40:06 -0500 (Sun, 08 Mar 2009)
New Revision: 36238

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_tools.py
Log:
Fix so that tabs change notebook pages on Mac, without setting focus to display.

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_tools.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_tools.py	2009-03-08 05:33:25 UTC (rev 36237)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_modules/nviz_tools.py	2009-03-08 05:40:06 UTC (rev 36238)
@@ -89,7 +89,7 @@
         #
         self.Bind(wx.EVT_CLOSE, self.OnClose)
         # avoid focusing map display window
-        self.notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, lambda x: None)
+        self.notebook.Bind(wx.EVT_NOTEBOOK_PAGE_CHANGED, self.OnPageChanged)
         
         #
         # layout
@@ -99,6 +99,10 @@
 
         self.SetSize(size)
 
+    def OnPageChanged(self, event):
+        new = event.GetSelection()
+        self.notebook.ChangeSelection(new)
+    
     def PostViewEvent(self, zExag=False):
         """Change view settings"""
         event = wxUpdateView(zExag=zExag)



More information about the grass-commit mailing list