Ver código fonte

wxGUI: fix deleting dict key while iterating (#1763)

Anna Petrasova 3 anos atrás
pai
commit
329f029666
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      gui/wxpython/lmgr/workspace.py

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

@@ -90,7 +90,7 @@ class WorkspaceManager:
 
         # delete all decorations
         for display in self.lmgr.GetAllMapDisplays():
-            for overlayId in display.decorations.keys():
+            for overlayId in list(display.decorations):
                 display.RemoveOverlay(overlayId)
 
         self.workspaceFile = None