[ui] Fix "canSubmit" which relied on erroneous conditions

Remove the "canStartComputation" condition which was not used anywhere
else and was not up-to-date: since it needed more than one image and no
ongoing computations to be "True", attempting to submit several branches
of a graph would always cause it to be "False", which in turn led the
"canSubmit" condition to be "False" (causing the pop-up requesting to
save the file to appear), even though the submission should have been
possible.

The submission should be possible whenever submitters are available and
the project file has been saved.
This commit is contained in:
Candice Bentéjac 2023-03-20 16:18:48 +01:00
parent ba0541c791
commit 9570437b7f

View file

@ -184,17 +184,9 @@ ApplicationWindow {
property bool warnIfUnsaved: true
// evaluate if global reconstruction computation can be started
property bool canStartComputation: _reconstruction ?
_reconstruction.viewpoints.count >= 2 // at least 2 images
&& !_reconstruction.computing // computation is not started
&& _reconstruction.graph.canComputeLeaves : // graph has no uncomputable nodes
false
// evaluate if graph computation can be submitted externally
property bool canSubmit: _reconstruction ?
_reconstruction.canSubmit // current setup allows to compute externally
&& canStartComputation // can be computed
&& _reconstruction.graph.filepath : // graph is saved on disk
false