[GRASS-SVN] r60758 - grass/branches/releasebranch_7_0/gui/wxpython/mapswipe

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jun 8 12:13:39 PDT 2014


Author: annakrat
Date: 2014-06-08 12:13:39 -0700 (Sun, 08 Jun 2014)
New Revision: 60758

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/mapswipe/frame.py
Log:
wxGUI/mapswipe: zoom only when there are layers, bug mentioned in #2315 (merge from trunk, r60757)

Modified: grass/branches/releasebranch_7_0/gui/wxpython/mapswipe/frame.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/mapswipe/frame.py	2014-06-08 19:12:22 UTC (rev 60757)
+++ grass/branches/releasebranch_7_0/gui/wxpython/mapswipe/frame.py	2014-06-08 19:13:39 UTC (rev 60758)
@@ -333,10 +333,11 @@
             layers += self.firstMap.GetListOfLayers()
         if self.rasters['second']:
             layers += self.secondMap.GetListOfLayers()
-        
-        self.GetFirstWindow().ZoomToMap(layers = layers)
-        self.GetSecondWindow().ZoomToMap(layers = layers)
 
+        if layers:
+            self.GetFirstWindow().ZoomToMap(layers=layers)
+            self.GetSecondWindow().ZoomToMap(layers=layers)
+
     def OnZoomToMap(self, event):
         """!Zoom to map"""
         self.ZoomToMap()



More information about the grass-commit mailing list