[ui] UIGraph: stop previous graph execution before setting the new one

This commit is contained in:
Yann Lanthony 2018-01-15 15:15:46 +01:00
parent 13c22dc884
commit aa0f08354b

View file

@ -98,6 +98,7 @@ class UIGraph(QObject):
def setGraph(self, g):
""" Set the internal graph. """
if self._graph:
self.stopExecution()
self.clear()
self._graph = g
self._graph.updated.connect(self.onGraphUpdated)
@ -214,7 +215,7 @@ class UIGraph(QObject):
return self._undoStack.tryAndPush(command)
def groupedGraphModification(self, title):
""" Get a GroupedGraphModification for this Reconstruction.
""" Get a GroupedGraphModification for this Graph.
Args:
title (str): the title of the macro command