[GRASS-SVN] r57351 - grass/trunk/gui/wxpython/mapswipe

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 1 14:02:25 PDT 2013


Author: annakrat
Date: 2013-08-01 14:02:25 -0700 (Thu, 01 Aug 2013)
New Revision: 57351

Modified:
   grass/trunk/gui/wxpython/mapswipe/frame.py
   grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py
Log:
wxGUI/mapswipe: fix zoom to map for different map extents

Modified: grass/trunk/gui/wxpython/mapswipe/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/frame.py	2013-08-01 20:43:06 UTC (rev 57350)
+++ grass/trunk/gui/wxpython/mapswipe/frame.py	2013-08-01 21:02:25 UTC (rev 57351)
@@ -313,10 +313,14 @@
         Set display extents to match selected raster (including NULLs)
         or vector map.
         """
+        layers = []
         if self.rasters['first']:
-            self.GetFirstWindow().ZoomToMap(layers = self.firstMap.GetListOfLayers())
+            layers += self.firstMap.GetListOfLayers()
         if self.rasters['second']:
-            self.GetSecondWindow().ZoomToMap(layers = self.secondMap.GetListOfLayers())
+            layers += self.secondMap.GetListOfLayers()
+        
+        self.GetFirstWindow().ZoomToMap(layers = layers)
+        self.GetSecondWindow().ZoomToMap(layers = layers)
 
     def OnZoomToMap(self, event):
         """!Zoom to map"""

Modified: grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py	2013-08-01 20:43:06 UTC (rev 57350)
+++ grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py	2013-08-01 21:02:25 UTC (rev 57351)
@@ -97,7 +97,6 @@
         frame.SetRasterNames()
 
     frame.SetViewMode(mode)
-    frame.ZoomToMap()
     frame.Show()
 
     app.MainLoop()



More information about the grass-commit mailing list