[qt6][qml] Push Application on the stack before loading the project

This prevents crashes when the project is done loading but
`Application` is not yet ready.
This commit is contained in:
Candice Bentéjac 2024-10-02 17:49:17 +02:00
parent de966e38e5
commit 54b59d0c5e
2 changed files with 5 additions and 5 deletions

View file

@ -119,12 +119,12 @@ ApplicationWindow {
title: "Open File"
nameFilters: ["Meshroom Graphs (*.mg)"]
onAccepted: {
if (_reconstruction.loadUrl(currentFile)) {
MeshroomApp.addRecentProjectFile(currentFile.toString())
}
if (mainStack.currentItem instanceof Homepage) {
mainStack.push("Application.qml")
}
if (_reconstruction.loadUrl(currentFile)) {
MeshroomApp.addRecentProjectFile(currentFile.toString())
}
}
}