Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions meshroom/ui/qml/Application.qml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ Page {
if (nodesName !== "")
nodesName += ", "
var node = _reconstruction.selectedNodes.at(i)
nodesName += node.name
if(node) {
nodesName += node.name
}
}
return nodesName
}
Expand Down Expand Up @@ -983,15 +985,15 @@ Page {
NodeChunks {
id: chunksListView
height: 6
width: parent.width
Layout.fillWidth: true
model: _reconstruction ? _reconstruction.sortedDFSChunks : null
highlightChunks: false
}

MSplitView {
id: topBottomSplit
Layout.fillHeight: true
width: parent.width
Layout.fillWidth: true

orientation: Qt.Vertical

Expand Down Expand Up @@ -1086,7 +1088,7 @@ Page {
}

Menu {
title: "Refresh Nodes Status"
title: "Refresh Nodes Method"

MenuItem {
id: enableAutoRefresh
Expand Down
40 changes: 29 additions & 11 deletions meshroom/ui/qml/GraphEditor/GraphEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -559,11 +559,16 @@ Item {
//canSubmitOrCompute: return int n : 0 >= n <= 3 | n=0 cannot submit or compute | n=1 can compute | n=2 can submit | n=3 can compute & submit
property int canSubmitOrCompute: currentNode != null && uigraph.graph.canSubmitOrCompute(currentNode)
property bool isComputed: {
var count = 0
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (!uigraph.selectedNodes.at(i).isComputed)
var node = uigraph.selectedNodes.at(i)
if (!node)
continue
if (!node.isComputed)
return false
count += 1
}
return uigraph.selectedNodes.count > 0
return count > 0
}
width: 220
onClosed: currentNode = null
Expand All @@ -573,27 +578,34 @@ Item {
property bool recompute: false
text: nodeMenu.isComputed ? "Recompute" : "Compute"
visible: {
var count = 0
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (!uigraph.selectedNodes.at(i).isComputable)
var node = uigraph.selectedNodes.at(i)
if (!node)
continue
if (!node.isComputable)
return false
count += 1
}
return uigraph.selectedNodes.count > 0
return count > 0
}
height: visible ? implicitHeight : 0

enabled: {
var canCompute = false
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (uigraph.graph.canComputeTopologically(uigraph.selectedNodes.at(i))) {
var node = uigraph.selectedNodes.at(i)
if (!node)
continue
if (uigraph.graph.canComputeTopologically(node)) {
if (nodeMenu.isComputed) {
canCompute = true
} else if (uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) % 2 == 1) {
} else if (uigraph.graph.canSubmitOrCompute(node) % 2 == 1) {
canCompute = true
}
}
}
return canCompute //canSubmit if canSubmitOrCompute == 1(can compute) or 3(can compute & submit)

}

onTriggered: {
Expand All @@ -610,21 +622,27 @@ Item {
property bool resubmit: false
text: nodeMenu.isComputed ? "Re-Submit" : "Submit"
visible: {
var count = 0
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (!uigraph.selectedNodes.at(i).isComputable)
var node = uigraph.selectedNodes.at(i)
if (node && !node.isComputable)
return false
count += 1
}
return uigraph.selectedNodes.count > 0 || uigraph.canSubmit
return count > 0 || uigraph.canSubmit
}
height: visible ? implicitHeight : 0

enabled: {
var canSubmit = false
for (var i = 0; i < uigraph.selectedNodes.count; ++i) {
if (uigraph.graph.canComputeTopologically(uigraph.selectedNodes.at(i))) {
var node = uigraph.selectedNodes.at(i)
if (!node)
continue
if (uigraph.graph.canComputeTopologically(node)) {
if (nodeMenu.isComputed) {
canSubmit = true
} else if (uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1) {
} else if (uigraph.graph.canSubmitOrCompute(node) > 1) {
canSubmit = true
}
}
Expand Down
5 changes: 3 additions & 2 deletions meshroom/ui/qml/GraphEditor/NodeEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,12 @@ Panel {
id: chunksLV
visible: (tabBar.currentIndex >= 1 && tabBar.currentIndex <= 3)
chunks: root.node.chunks
SplitView.preferredWidth: 55
SplitView.minimumWidth: 20
}

StackLayout {
Layout.fillHeight: true
Layout.fillWidth: true
SplitView.fillWidth: true

currentIndex: tabBar.currentIndex

Expand Down
Loading