[GRASS-SVN] r70447 - in grass/trunk/gui/wxpython: docs gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Jan 28 18:09:41 PST 2017
Author: wenzeslaus
Date: 2017-01-28 18:09:41 -0800 (Sat, 28 Jan 2017)
New Revision: 70447
Modified:
grass/trunk/gui/wxpython/docs/wxGUI.html
grass/trunk/gui/wxpython/gui_core/mapdisp.py
Log:
wxGUI/mapdisp: web browser-like shortcuts for re-rendering the map display [news]
Modified: grass/trunk/gui/wxpython/docs/wxGUI.html
===================================================================
--- grass/trunk/gui/wxpython/docs/wxGUI.html 2017-01-27 21:19:46 UTC (rev 70446)
+++ grass/trunk/gui/wxpython/docs/wxGUI.html 2017-01-29 02:09:41 UTC (rev 70447)
@@ -622,6 +622,12 @@
<dl>
<dt>F11</dt>
<dd>Fullscreen mode (toggle on/off)</dd>
+ <dt>Ctrl+W</dt>
+ <dd>Close map display</dd>
+ <dt>Ctrl+R</dt>
+ <dd>Render map (re-renders map)</dd>
+ <dt>F5</dt>
+ <dd>Render map (re-renders map)</dd>
</dl>
Modified: grass/trunk/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapdisp.py 2017-01-27 21:19:46 UTC (rev 70446)
+++ grass/trunk/gui/wxpython/gui_core/mapdisp.py 2017-01-29 02:09:41 UTC (rev 70447)
@@ -114,13 +114,20 @@
self._toolSwitcher = ToolSwitcher()
self._toolSwitcher.toggleToolChanged.connect(self._onToggleTool)
+ self._initShortcuts()
+
+ def _initShortcuts(self):
+
# set accelerator table (fullscreen, close window)
+ shortcuts_table = (
+ (self.OnFullScreen, wx.ACCEL_NORMAL, wx.WXK_F11),
+ (self.OnCloseWindow, wx.ACCEL_CTRL, ord('W')),
+ (self.OnRender, wx.ACCEL_CTRL, ord('R')),
+ (self.OnRender, wx.ACCEL_NORMAL, wx.WXK_F5),
+ )
accelTable = []
- for wxId, handler, entry, kdb in (
- (wx.NewId(),
- self.OnFullScreen, wx.ACCEL_NORMAL, wx.WXK_F11),
- (wx.NewId(),
- self.OnCloseWindow, wx.ACCEL_CTRL, ord('W'))):
+ for handler, entry, kdb in shortcuts_table:
+ wxId = wx.NewId()
self.Bind(wx.EVT_MENU, handler, id=wxId)
accelTable.append((entry, kdb, wxId))
More information about the grass-commit
mailing list