Do not cause "dictionary changed size during iteration" errors when changing view

Connecting to a signal while it is emitting causes errors.
This commit is contained in:
Arjen Hiemstra 2015-07-13 13:49:07 +02:00
parent 608283f5f4
commit fb7b7ca7b8

View file

@ -22,15 +22,15 @@ class ProcessSlicedObjectListJob(Job):
super().__init__()
self._message = message
self._scene = Application.getInstance().getController().getScene()
self._progress = None
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
def run(self):
if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
self._progress = Message(catalog.i18nc("Layers View mode", "Layers"), 0, False, 0)
self._progress.show()
Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)
objectIdMap = {}
new_node = SceneNode()
## Put all nodes in a dict identified by ID