Skip to content

Commit

Permalink
Move logic to correct location
Browse files Browse the repository at this point in the history
  • Loading branch information
BigRoy committed Jan 14, 2025
1 parent 2be4d7c commit 44da464
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions client/ayon_core/tools/workfiles/widgets/files_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,6 @@ def _on_workarea_save_clicked(self):
def _on_workarea_path_changed(self, event):
valid_path = event["path"] is not None
self._workarea_btn_open.setEnabled(valid_path)
valid_task = self._selected_task_id is not None
self._workarea_btn_save.setEnabled(valid_task)
self._workarea_btn_browse.setEnabled(valid_task)

# -------------------------------------------------------------
# Published workfiles
Expand All @@ -283,8 +280,9 @@ def _update_published_btns_state(self):
self._published_btn_change_context.setEnabled(enabled)

def _update_workarea_btns_state(self):
enabled = self._is_save_enabled
enabled = self._is_save_enabled and self._valid_selected_context
self._workarea_btn_save.setEnabled(enabled)
self._workarea_btn_browse.setEnabled(self._valid_selected_context)

def _on_published_repre_changed(self, event):
self._valid_representation_id = event["representation_id"] is not None
Expand All @@ -299,6 +297,7 @@ def _on_task_changed(self, event):
and self._selected_task_id is not None
)
self._update_published_btns_state()
self._update_workarea_btns_state()

def _on_published_save_clicked(self):
result = self._exec_save_as_dialog()
Expand Down

0 comments on commit 44da464

Please sign in to comment.