Procházet zdrojové kódy

wxGUI/lmgr: connecting the updateMap signal from the main giface object

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55431 15284696-431f-4ddb-bdfa-cd5b030d7da7
Vaclav Petras před 12 roky
rodič
revize
9d21780000
1 změnil soubory, kde provedl 5 přidání a 0 odebrání
  1. 5 0
      gui/wxpython/lmgr/frame.py

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

@@ -162,6 +162,7 @@ class GMFrame(wx.Frame):
         self.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown)
 
         self._giface.mapCreated.connect(self.OnMapCreated)
+        self._giface.updateMap.connect(self._updateCurrentMap)
 
         # minimal frame size
         self.SetMinSize((globalvar.GM_WINDOW_SIZE[0], 400))
@@ -1664,6 +1665,10 @@ class GMFrame(wx.Frame):
                                        lcmd = cmd,
                                        lgroup = None)
 
+    def _updateCurrentMap(self):
+        """!Updates map of the current map window."""
+        self.GetMapDisplay().GetWindow().UpdateMap()
+
     def OnMapCreated(self, name, ltype, add=None):
         """!Decides wheter the map should be added to layer tree."""
         if add is None: