mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 02:08:08 +02:00
[ui] Re-submit behavior implemented
This commit is contained in:
parent
72201a80ff
commit
82dd2a1f31
1 changed files with 16 additions and 3 deletions
|
@ -74,6 +74,10 @@ Item {
|
||||||
computeRequest(uigraph.selectedNodes)
|
computeRequest(uigraph.selectedNodes)
|
||||||
computeMenuItem.recompute = false
|
computeMenuItem.recompute = false
|
||||||
}
|
}
|
||||||
|
else if (submitMenuItem.resubmit) {
|
||||||
|
submitRequest(uigraph.selectedNodes)
|
||||||
|
submitMenuItem.resubmit = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Duplicate a node and optionally all the following ones
|
/// Duplicate a node and optionally all the following ones
|
||||||
|
@ -496,7 +500,9 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Submit"
|
id: submitMenuItem
|
||||||
|
property bool resubmit: false
|
||||||
|
text: nodeMenu.isComputed ? "Re-Submit" : "Submit"
|
||||||
visible: {
|
visible: {
|
||||||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
|
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
|
||||||
if (!uigraph.selectedNodes.at(i).isComputable)
|
if (!uigraph.selectedNodes.at(i).isComputable)
|
||||||
|
@ -513,9 +519,16 @@ Item {
|
||||||
canSubmit = true
|
canSubmit = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return canSubmit
|
return canSubmit || nodeMenu.isComputed
|
||||||
|
}
|
||||||
|
onTriggered: {
|
||||||
|
if (nodeMenu.isComputed) {
|
||||||
|
resubmit = true
|
||||||
|
deleteDataMenuItem.showConfirmationDialog(false)
|
||||||
|
} else {
|
||||||
|
submitRequest(uigraph.selectedNodes)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
onTriggered: submitRequest(uigraph.selectedNodes)
|
|
||||||
}
|
}
|
||||||
MenuItem {
|
MenuItem {
|
||||||
text: "Stop Computation"
|
text: "Stop Computation"
|
||||||
|
|
Loading…
Add table
Reference in a new issue