mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
fixed buttons disabled/enabled states
This commit is contained in:
parent
4a585cf830
commit
f1a5721418
3 changed files with 20 additions and 2 deletions
|
|
@ -523,6 +523,10 @@ class PublisherController:
|
|||
def publish_has_crashed(self):
|
||||
return bool(self._publish_error)
|
||||
|
||||
@property
|
||||
def publish_has_validation_errors(self):
|
||||
return bool(self._publish_validation_errors)
|
||||
|
||||
@property
|
||||
def publish_max_progress(self):
|
||||
return self._publish_max_progress
|
||||
|
|
|
|||
|
|
@ -203,7 +203,14 @@ class PublishFrame(QtWidgets.QFrame):
|
|||
if validate_enabled:
|
||||
validate_enabled = not self.controller.publish_has_validated
|
||||
if publish_enabled:
|
||||
publish_enabled = not self.controller.publish_has_finished
|
||||
if (
|
||||
self.controller.publish_has_validated
|
||||
and self.controller.publish_has_validation_errors
|
||||
):
|
||||
publish_enabled = False
|
||||
|
||||
else:
|
||||
publish_enabled = not self.controller.publish_has_finished
|
||||
|
||||
self.validate_btn.setEnabled(validate_enabled)
|
||||
self.publish_btn.setEnabled(publish_enabled)
|
||||
|
|
|
|||
|
|
@ -364,7 +364,14 @@ class PublisherWindow(QtWidgets.QWidget):
|
|||
if validate_enabled:
|
||||
validate_enabled = not self.controller.publish_has_validated
|
||||
if publish_enabled:
|
||||
publish_enabled = not self.controller.publish_has_finished
|
||||
if (
|
||||
self.controller.publish_has_validated
|
||||
and self.controller.publish_has_validation_errors
|
||||
):
|
||||
publish_enabled = False
|
||||
|
||||
else:
|
||||
publish_enabled = not self.controller.publish_has_finished
|
||||
|
||||
self.validate_btn.setEnabled(validate_enabled)
|
||||
self.publish_btn.setEnabled(publish_enabled)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue