Explorar o código

wxGUI rendering: when deleting layer check if .legrow file exists (#691)

Tomas Zigo %!s(int64=5) %!d(string=hai) anos
pai
achega
cb8f6683b3
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      gui/wxpython/core/render.py

+ 2 - 1
gui/wxpython/core/render.py

@@ -1348,7 +1348,8 @@ class Map(object):
                     os.remove(f)
 
             if layer.GetType() in ('vector', 'thememap'):
-                os.remove(layer._legrow)
+                if os.path.isfile(layer._legrow):
+                    os.remove(layer._legrow)
 
             list.remove(layer)