Browse Source

wxGUI/mapswipe: attempt to fix adding layers bug, discussed in https://trac.osgeo.org/grass/ticket/2315

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@60753 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 11 năm trước cách đây
mục cha
commit
40648cd3a9
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      gui/wxpython/gui_core/simplelmgr.py

+ 6 - 0
gui/wxpython/gui_core/simplelmgr.py

@@ -289,6 +289,12 @@ class SimpleLayerManager(wx.Panel):
         items = []
         active = []
         selected = []
+
+        # remove hidden (temporary) layers first
+        for layer in reversed(self._layerList):
+            if layer.hidden:
+                self._layerList.RemoveLayer(layer)
+
         for layer in self._layerList:
             if layer.opacity < 1:
                 items.append("{name} (opacity {opacity}%)".format(name=layer.name,