[ui] Fix conditions on which the prompt asking the user to save a project before submitting it to the render farm relies #1942
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes an issue introduced by #1927, which aimed at displaying a warning pop-up whenever the user attempted to submit a project file that was not saved to the render farm.
To do so, it relied on an already existing
canSubmit
variable, which itself depended on acanStartComputation
variable that was not used anywhere else and was actually outdated.In particular, the
canStartComputation
variable required to have more than one image for any computation to be allowed, and it was automatically set to false if there was any ongoing computation. This was not compatible with what is expected ofcanSubmit
, which should be set to true as soon as submitters are available and the project file is saved, independently from what is (or is not) being computed.As a consequence, attempting to submit more than one computation to the render farm caused the warning pop-up to appear, even though the project file was correctly saved.
With this PR, we remove
canStartComputation
which is now useless, and we fix the conditions on which the warning pop-up relies to appear or not.Features list
canStartComputation
variable;canSubmit
variable, prompting the warning dialog if and only if the project file is not saved on disk.