[ui] Application: Changing the current project refreshes the NodeEditor to reset the current Tab index

This commit is contained in:
waaake 2024-12-31 09:56:48 +05:30
parent a2f4ac560f
commit 3f47c54595
2 changed files with 11 additions and 1 deletions

View file

@ -255,7 +255,7 @@ class Graph(BaseObject):
@property
def isSaving(self):
""" Return True if the graph is currently being loaded. """
""" Return True if the graph is currently being saved. """
return self._saving
@Slot(str)

View file

@ -20,6 +20,16 @@ Page {
property alias unsavedDialog: unsavedDialog
property alias workspaceView: workspaceView
readonly property var scenefile: _reconstruction ? _reconstruction.graph.filepath : "";
onScenefileChanged: {
// Check if we're not currently saving and emit the currentProjectChanged signal
if (! _reconstruction.graph.isSaving) {
// Refresh the NodeEditor
nodeEditor.refresh();
}
}
Settings {
id: settingsUILayout
category: "UILayout"