mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-29 18:27:23 +02:00
[ui] Compatibility nodes cannot be computed or recomputed
When the compatibility node was fully computed, the recompute/resubmit button was available in the UI menu. The reason is that we need to propagate that the connected nodes can be computed if there is a compatibility node in the dependency iff it is already fully computed. Now there is an additional explicit check.
This commit is contained in:
parent
8be8ea5703
commit
be43c5c2a7
1 changed files with 20 additions and 6 deletions
|
@ -570,11 +570,21 @@ Item {
|
||||||
|
|
||||||
readonly property bool isSelectionFullyComputed: {
|
readonly property bool isSelectionFullyComputed: {
|
||||||
return uigraph.nodeSelection.selectedIndexes.every(function(idx) {
|
return uigraph.nodeSelection.selectedIndexes.every(function(idx) {
|
||||||
return uigraph.graph.nodes.at(idx.row).isComputed;
|
const node = uigraph.graph.nodes.at(idx.row);
|
||||||
|
return node.isComputed;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property bool selectionContainsComputableNodes: {
|
// Selection contains only compatibility nodes
|
||||||
|
readonly property bool isSelectionFullyCompatibility: {
|
||||||
|
return uigraph.nodeSelection.selectedIndexes.every(function(idx) {
|
||||||
|
const node = uigraph.graph.nodes.at(idx.row);
|
||||||
|
return node.isCompatibilityNode;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Selection contains at least one computable node type
|
||||||
|
readonly property bool selectionContainsComputableNodeType: {
|
||||||
return uigraph.nodeSelection.selectedIndexes.some(function(idx) {
|
return uigraph.nodeSelection.selectedIndexes.some(function(idx) {
|
||||||
const node = uigraph.graph.nodes.at(idx.row);
|
const node = uigraph.graph.nodes.at(idx.row);
|
||||||
return node.isComputableType;
|
return node.isComputableType;
|
||||||
|
@ -582,7 +592,9 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property bool canSelectionBeComputed: {
|
readonly property bool canSelectionBeComputed: {
|
||||||
if(!selectionContainsComputableNodes)
|
if(!selectionContainsComputableNodeType)
|
||||||
|
return false;
|
||||||
|
if(isSelectionFullyCompatibility)
|
||||||
return false;
|
return false;
|
||||||
if(isSelectionFullyComputed)
|
if(isSelectionFullyComputed)
|
||||||
return true;
|
return true;
|
||||||
|
@ -598,10 +610,12 @@ Item {
|
||||||
return b
|
return b
|
||||||
}
|
}
|
||||||
|
|
||||||
readonly property bool isSelectionSubmitable: uigraph.canSubmit && selectionContainsComputableNodes
|
readonly property bool isSelectionSubmitable: uigraph.canSubmit && selectionContainsComputableNodeType
|
||||||
|
|
||||||
readonly property bool canSelectionBeSubmitted: {
|
readonly property bool canSelectionBeSubmitted: {
|
||||||
if(!selectionContainsComputableNodes)
|
if(!selectionContainsComputableNodeType)
|
||||||
|
return false;
|
||||||
|
if(isSelectionFullyCompatibility)
|
||||||
return false;
|
return false;
|
||||||
if(isSelectionFullyComputed)
|
if(isSelectionFullyComputed)
|
||||||
return true;
|
return true;
|
||||||
|
@ -624,7 +638,7 @@ Item {
|
||||||
MenuItem {
|
MenuItem {
|
||||||
id: computeMenuItem
|
id: computeMenuItem
|
||||||
text: nodeMenu.isSelectionFullyComputed ? "Re-Compute" : "Compute"
|
text: nodeMenu.isSelectionFullyComputed ? "Re-Compute" : "Compute"
|
||||||
visible: nodeMenu.selectionContainsComputableNodes
|
visible: nodeMenu.selectionContainsComputableNodeType
|
||||||
height: visible ? implicitHeight : 0
|
height: visible ? implicitHeight : 0
|
||||||
enabled: nodeMenu.canSelectionBeComputed
|
enabled: nodeMenu.canSelectionBeComputed
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue