Browse Source

wxGUI: fix layertree error when switching to different location (merge from trunk, https://trac.osgeo.org/grass/changeset/64858)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@64859 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 10 năm trước cách đây
mục cha
commit
5d0360bcb2
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      gui/wxpython/lmgr/layertree.py

+ 2 - 0
gui/wxpython/lmgr/layertree.py

@@ -1715,6 +1715,8 @@ class LayerTree(treemixin.DragAndDrop, CT.CustomTreeCtrl):
     def GetVisibleLayers(self, skipDigitized=False):
         # make a list of visible layers
         layers = []
+        if self.root is None:
+            return layers
 
         vislayer = self.GetFirstChild(self.root)[0]