mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-07-14 07:17:24 +02:00
[ui] Graph: change setGraph and clear
This commit is contained in:
parent
8020cf5158
commit
b9e68b7c3e
1 changed files with 5 additions and 2 deletions
|
@ -275,7 +275,11 @@ class UIGraph(QObject):
|
|||
if self._graph:
|
||||
self.stopExecution()
|
||||
self.clear()
|
||||
oldGraph = self._graph
|
||||
self._graph = g
|
||||
if oldGraph:
|
||||
oldGraph.deleteLater()
|
||||
|
||||
self._graph.updated.connect(self.onGraphUpdated)
|
||||
self._graph.update()
|
||||
# perform auto-layout if graph does not provide nodes positions
|
||||
|
@ -320,8 +324,7 @@ class UIGraph(QObject):
|
|||
if self._graph:
|
||||
self.clearNodeHover()
|
||||
self.clearNodeSelection()
|
||||
self._graph.deleteLater()
|
||||
self._graph = None
|
||||
self._graph.clear()
|
||||
self._sortedDFSChunks.clear()
|
||||
self._undoStack.clear()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue