Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Fix conditions on which the prompt asking the user to save a project before submitting it to the render farm relies #1942

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

cbentejac
Copy link
Contributor

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 a canStartComputation 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 of canSubmit, 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

  • Remove unused and outdated canStartComputation variable;
  • Fix the conditions for the canSubmit variable, prompting the warning dialog if and only if the project file is not saved on disk.

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.
@fabiencastan fabiencastan merged commit c062160 into develop Mar 21, 2023
@fabiencastan fabiencastan deleted the fix/submitPopUp branch March 21, 2023 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants