[GRASS-SVN] r61267 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 17 13:42:22 PDT 2014
Author: annakrat
Date: 2014-07-17 13:42:22 -0700 (Thu, 17 Jul 2014)
New Revision: 61267
Modified:
grass/trunk/gui/wxpython/gui_core/mapdisp.py
Log:
wxGUI: fix full screen on Windows by using accelerator table
Modified: grass/trunk/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapdisp.py 2014-07-17 18:38:42 UTC (rev 61266)
+++ grass/trunk/gui/wxpython/gui_core/mapdisp.py 2014-07-17 20:42:22 UTC (rev 61267)
@@ -101,7 +101,11 @@
self._toolSwitcher = ToolSwitcher()
self._toolSwitcher.toggleToolChanged.connect(self._onToggleTool)
- self.Bind(wx.EVT_KEY_UP, self.OnFullScreen)
+ # set accelerator table for fullscreen
+ fullScreenId = wx.NewId()
+ self.Bind(wx.EVT_MENU, self.OnFullScreen, id=fullScreenId)
+ accelTable = wx.AcceleratorTable([(wx.ACCEL_NORMAL, wx.WXK_F11, fullScreenId)])
+ self.SetAcceleratorTable(accelTable)
def _initMap(self, Map):
"""Initialize map display, set dimensions and map region
@@ -127,11 +131,11 @@
self.StatusbarUpdate()
def OnFullScreen(self, event):
- if event.GetKeyCode() == wx.WXK_F11:
- for toolbar in self.toolbars.keys():
- self._mgr.GetPane(self.toolbars[toolbar]).Show(self.IsFullScreen())
- self._mgr.Update()
- self.ShowFullScreen(not self.IsFullScreen())
+ """!Switch fullscreen mode, hides also toolbars"""
+ for toolbar in self.toolbars.keys():
+ self._mgr.GetPane(self.toolbars[toolbar]).Show(self.IsFullScreen())
+ self._mgr.Update()
+ self.ShowFullScreen(not self.IsFullScreen())
event.Skip()
def GetToolSwitcher(self):
More information about the grass-commit
mailing list