From 614f831457725007debb8ee427972ddb51e7fb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Candice=20Bent=C3=A9jac?= Date: Thu, 2 Mar 2023 19:13:00 +0100 Subject: [PATCH] [ui] Force nodes' status update before performing a submit/compute/delete This ensures that each node's status is correct before being computed, submitted, or before having its data deleted. This is especially useful when the File Poller is in minimal node, and only monitors the nodes that are currently submitted or running. If a graph is being opened in two different instances of Meshroom, and computations are started on it in one of the instances, the other one will not be aware of it (as the signals indicating computations have started will have been emitted in the first instance, so no chunk will be added to the monitoring in the second one). By forcing the update of the statuses before actually starting computations or deleting data, we ensure that there will not be any computational conflicts (same nodes submitted twice in farm, for example) and that the users can know at all times what they are doing without manually triggering a refresh. This is not critical for the "Delete Data" part, as the action can already be triggered even with there is no data to delete, but is still useful to keep the displayed nodes as up-to-date with their actual status as possible. --- meshroom/ui/qml/GraphEditor/GraphEditor.qml | 1 + meshroom/ui/qml/main.qml | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index dc946937..59cec42c 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -529,6 +529,7 @@ Item { } function showConfirmationDialog(deleteFollowing) { + uigraph.forceNodesStatusUpdate(); var obj = deleteDataDialog.createObject(root, { "node": nodeMenu.currentNode, diff --git a/meshroom/ui/qml/main.qml b/meshroom/ui/qml/main.qml index 62889c10..9e83ce7f 100644 --- a/meshroom/ui/qml/main.qml +++ b/meshroom/ui/qml/main.qml @@ -1090,8 +1090,14 @@ ApplicationWindow { _reconstruction.setActiveNode(node); workspaceView.viewNode(node, mouse); } - onComputeRequest: computeManager.compute(node) - onSubmitRequest: computeManager.submit(node) + onComputeRequest: { + _reconstruction.forceNodesStatusUpdate(); + computeManager.compute(node) + } + onSubmitRequest: { + _reconstruction.forceNodesStatusUpdate(); + computeManager.submit(node) + } } TaskManager {