mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[ui] ensure no local computation is in progress before closing Meshroom
This commit is contained in:
parent
928e3981b9
commit
1663b86542
1 changed files with 27 additions and 0 deletions
|
@ -20,6 +20,8 @@ ApplicationWindow {
|
|||
onClosing: {
|
||||
// make sure document is saved before exiting application
|
||||
close.accepted = false
|
||||
if(!ensureNotComputing())
|
||||
return
|
||||
ensureSaved(function(){ Qt.quit() })
|
||||
}
|
||||
|
||||
|
@ -125,6 +127,31 @@ ApplicationWindow {
|
|||
return saved
|
||||
}
|
||||
|
||||
Dialog {
|
||||
id: computingAtExitDialog
|
||||
title: "Operation in progress"
|
||||
x: parent.width/2 - width/2
|
||||
y: parent.height/2 - height/2
|
||||
padding: 15
|
||||
standardButtons: Dialog.Ok
|
||||
modal: true
|
||||
Label {
|
||||
text: "Please stop any local computation before exiting Meshroom"
|
||||
}
|
||||
}
|
||||
|
||||
// Check and return whether no local computation is in progress
|
||||
function ensureNotComputing()
|
||||
{
|
||||
if(_reconstruction.computingLocally)
|
||||
{
|
||||
// Open a warning dialog to ask for computation to be stopped
|
||||
computingAtExitDialog.open()
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
Dialog {
|
||||
// Popup displayed while the application
|
||||
// is busy building intrinsics while importing images
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue