mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[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:
parent
de966e38e5
commit
54b59d0c5e
2 changed files with 5 additions and 5 deletions
|
@ -373,10 +373,10 @@ Page {
|
|||
Connections {
|
||||
target: projectDelegate
|
||||
function onClicked() {
|
||||
if (!modelData["path"]){
|
||||
if (!modelData["path"]) {
|
||||
initFileDialogFolder(openFileDialog)
|
||||
openFileDialog.open()
|
||||
} else{
|
||||
} else {
|
||||
// Open project
|
||||
mainStack.push("Application.qml")
|
||||
if (_reconstruction.loadUrl(modelData["path"])) {
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue