mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-30 09:26:32 +02:00
[ui][graph] do layout reset for graphs without NodesPositions Feature
allow to set initial position for older projects or new projects that have not been saved yet
This commit is contained in:
parent
f415745a4a
commit
2bd06c4edb
1 changed files with 4 additions and 0 deletions
|
@ -211,6 +211,10 @@ class UIGraph(QObject):
|
|||
self._graph = g
|
||||
self._graph.updated.connect(self.onGraphUpdated)
|
||||
self._graph.update()
|
||||
# perform auto-layout if graph does not provide nodes positions
|
||||
if Graph.IO.Features.NodesPositions not in self._graph.fileFeatures:
|
||||
self._layout.reset()
|
||||
self._undoStack.clear() # clear undo-stack after layout
|
||||
self.graphChanged.emit()
|
||||
|
||||
def onGraphUpdated(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue