mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-21 21:16:29 +02:00
[ui] Removal of useless option for Compute and Submit selected nodes
It is now included directly in Compute and Submit options.
This commit is contained in:
parent
887844541c
commit
cc6acbc610
1 changed files with 18 additions and 24 deletions
|
@ -448,26 +448,24 @@ Item {
|
|||
|
||||
MenuItem {
|
||||
text: "Compute"
|
||||
visible: nodeMenu.currentNode ? nodeMenu.currentNode.isComputable : false
|
||||
height: visible ? implicitHeight : 0
|
||||
enabled: nodeMenu.canComputeNode && (nodeMenu.canSubmitOrCompute%2 == 1) //canSubmit if canSubmitOrCompute == 1(can compute) or 3(can compute & submit)
|
||||
onTriggered: {
|
||||
computeRequest(nodeMenu.currentNode)
|
||||
visible: {
|
||||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
|
||||
if (!uigraph.selectedNodes.at(i).isComputable)
|
||||
return false
|
||||
}
|
||||
return uigraph.selectedNodes.count > 0
|
||||
}
|
||||
}
|
||||
MenuItem {
|
||||
text: "Compute Selected Node(s)"
|
||||
visible: uigraph.selectedNodes.count > 0
|
||||
height: visible ? implicitHeight : 0
|
||||
|
||||
enabled: {
|
||||
var canCompute = false
|
||||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
|
||||
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i))%2 == 1){
|
||||
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) % 2 == 1) {
|
||||
canCompute = true
|
||||
}
|
||||
}
|
||||
return canCompute
|
||||
return canCompute //canSubmit if canSubmitOrCompute == 1(can compute) or 3(can compute & submit)
|
||||
|
||||
}
|
||||
|
||||
onTriggered: {
|
||||
|
@ -476,29 +474,25 @@ Item {
|
|||
}
|
||||
MenuItem {
|
||||
text: "Submit"
|
||||
enabled: nodeMenu.canComputeNode && nodeMenu.canSubmitOrCompute > 1
|
||||
visible: nodeMenu.currentNode ? nodeMenu.currentNode.isComputable : uigraph ? uigraph.canSubmit : false
|
||||
height: visible ? implicitHeight : 0
|
||||
onTriggered: submitRequest(nodeMenu.currentNode)
|
||||
}
|
||||
MenuItem {
|
||||
text: "Submit Selected Node(s)"
|
||||
visible: uigraph.selectedNodes.count > 0
|
||||
visible: {
|
||||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
|
||||
if (!uigraph.selectedNodes.at(i).isComputable)
|
||||
return false
|
||||
}
|
||||
return uigraph.selectedNodes.count > 0 || uigraph.canSubmit
|
||||
}
|
||||
height: visible ? implicitHeight : 0
|
||||
|
||||
enabled: {
|
||||
var canSubmit = false
|
||||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
|
||||
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1){
|
||||
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1) {
|
||||
canSubmit = true
|
||||
}
|
||||
}
|
||||
return canSubmit
|
||||
}
|
||||
|
||||
onTriggered: {
|
||||
submitRequest(uigraph.selectedNodes)
|
||||
}
|
||||
onTriggered: submitRequest(uigraph.selectedNodes)
|
||||
}
|
||||
MenuItem {
|
||||
text: "Stop Computation"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue