Browse Source

wxGUI: menu item and shortcut to re-render all map displays

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@70449 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras 8 years ago
parent
commit
7bd65c8a66

+ 2 - 0
gui/wxpython/docs/wxGUI.html

@@ -573,6 +573,8 @@ the computational region extents.
   <dd>Switch 'Layers' and 'Console' tab</dd>
   <dt>Ctrl+Q</dt>
   <dd>Quit</dd>
+  <dt>Ctrl+R</dt>
+  <dd>Render map in all map displays</dd>
 </dl>
 
 <b>Workspace</b>

+ 8 - 0
gui/wxpython/lmgr/frame.py

@@ -840,6 +840,10 @@ class GMFrame(wx.Frame):
 
             return mlist
 
+    def GetAllMapDisplays(self):
+        """Get all (open) map displays"""
+        return self.GetMapDisplay(onlyCurrent=False)
+
     def GetLogWindow(self):
         """Gets console for command output and messages"""
         return self._gconsole
@@ -1686,6 +1690,10 @@ class GMFrame(wx.Frame):
         for display in self.GetMapDisplay(onlyCurrent=False):
             display.OnCloseWindow(event)
 
+    def OnRenderAllMapDisplays(self, event=None):
+        for display in self.GetAllMapDisplays():
+            display.OnRender(None)
+
     def OnRenameDisplay(self, event):
         """Change Map Display name"""
         name = self.notebookLayers.GetPageText(self.currentPageNum)

+ 1 - 0
gui/wxpython/xml/toolboxes.xml

@@ -228,6 +228,7 @@
       <wxgui-item name="AddWebServiceLayer"/>
       <separator/>
       <wxgui-item name="NewMapDisplayWindow"/>
+      <wxgui-item name="RenderAllMapDisplays"/>
       <wxgui-item name="CloseCurrentMapDisplayWindow"/>
       <wxgui-item name="CloseAllOpenMapDisplayWindows"/>
     </items>

+ 6 - 0
gui/wxpython/xml/wxgui_items.xml

@@ -194,6 +194,12 @@
     <handler>OnNewDisplay</handler>
     <description>Open new map display window</description>
   </wxgui-item>
+  <wxgui-item name="RenderAllMapDisplays">
+    <label>Render all map displays</label>
+    <handler>OnRenderAllMapDisplays</handler>
+    <description>Re-render maps in all open map display windows</description>
+    <shortcut>Ctrl+R</shortcut>
+  </wxgui-item>
   <wxgui-item name="CloseCurrentMapDisplayWindow">
     <label>Close current map display window</label>
     <handler>OnDisplayClose</handler>