ソースを参照

wxGUI/mapswipe: zoom only when there are layers, bug mentioned in https://trac.osgeo.org/grass/ticket/2315

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60757 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 年 前
コミット
cc40632656
1 ファイル変更4 行追加3 行削除
  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()
         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"""