[ui] GraphEditor: check sessionUid for stop/cancel computation

This commit is contained in:
Julien-Haudegond 2020-08-26 15:33:45 +02:00
parent 32a7005928
commit a00c82cd2f
2 changed files with 17 additions and 4 deletions

View file

@ -294,10 +294,12 @@ Item {
enabled: {
if(!nodeMenu.currentNode)
return false
// Only locked nodes running in local can be stopped
// Only locked nodes running in local with the same sessionUid
// as the Meshroom instance can be stopped
return nodeMenu.currentNode.locked &&
nodeMenu.currentNode.globalStatus === "RUNNING" &&
nodeMenu.currentNode.globalExecMode === "LOCAL"
nodeMenu.currentNode.globalExecMode === "LOCAL" &&
nodeMenu.currentNode.statusInThisSession()
}
visible: enabled
height: visible ? implicitHeight : 0
@ -308,10 +310,12 @@ Item {
enabled: {
if(!nodeMenu.currentNode)
return false
// Only locked nodes submitted in local can be canceled
// Only locked nodes submitted in local with the same sessionUid
// as the Meshroom instance can be canceled
return nodeMenu.currentNode.locked &&
nodeMenu.currentNode.globalStatus === "SUBMITTED" &&
nodeMenu.currentNode.globalExecMode === "LOCAL"
nodeMenu.currentNode.globalExecMode === "LOCAL" &&
nodeMenu.currentNode.statusInThisSession()
}
visible: enabled
height: visible ? implicitHeight : 0