Forráskód Böngészése

wxGUI/mapswipe: zoom only when there are layers, bug mentioned in https://trac.osgeo.org/grass/ticket/2315 (merge from trunk, https://trac.osgeo.org/grass/changeset/60757)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@60758 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 éve
szülő
commit
707ef0ac56
1 módosított fájl, 4 hozzáadás és 3 törlés
  1. 4 3
      gui/wxpython/mapswipe/frame.py

+ 4 - 3
gui/wxpython/mapswipe/frame.py

@@ -333,9 +333,10 @@ class SwipeMapFrame(DoubleMapFrame):
             layers += self.firstMap.GetListOfLayers()
             layers += self.firstMap.GetListOfLayers()
         if self.rasters['second']:
         if self.rasters['second']:
             layers += self.secondMap.GetListOfLayers()
             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):
     def OnZoomToMap(self, event):
         """!Zoom to map"""
         """!Zoom to map"""