Explorar o código

wxGUI/lmgr: fix get layer name if layer is group (#1066)

Co-authored-by: Anna Petrasova <kratochanna@gmail.com>
Tomas Zigo %!s(int64=4) %!d(string=hai) anos
pai
achega
1515813fe8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      gui/wxpython/lmgr/giface.py

+ 1 - 1
gui/wxpython/lmgr/giface.py

@@ -44,7 +44,7 @@ class Layer(object):
         return self._pydata[0].keys()
 
     def __str__(self):
-        return '' if self.maplayer.name is None else self.maplayer.name
+        return '' if (self.maplayer is None or self.maplayer.name is None) else self.maplayer.name
 
 
 class LayerList(object):