Sfoglia il codice sorgente

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

Tomas Zigo 4 anni fa
parent
commit
cac163aefa
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      gui/wxpython/core/render.py

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

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