Browse Source

wxGUI: launch animation with maps only if more than 1 map is selected

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@54075 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 năm trước cách đây
mục cha
commit
b34acf1f58
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      gui/wxpython/lmgr/frame.py

+ 2 - 2
gui/wxpython/lmgr/frame.py

@@ -1401,13 +1401,13 @@ class GMFrame(wx.Frame):
         frame.CentreOnScreen()
         frame.Show()
 
-        rasters = []
         tree = self.GetLayerTree()
         if tree:
+            rasters = []
             for layer in tree.GetSelectedLayers(checkedOnly = False):
                 if tree.GetLayerInfo(layer, key = 'type') == 'raster':
                     rasters.append(tree.GetLayerInfo(layer, key = 'maplayer').GetName())
-            if rasters:
+            if len(rasters) >= 2:
                 frame.SetAnimations(raster = [rasters, None, None, None])