Skip to content

Commit

Permalink
Fix button state
Browse files Browse the repository at this point in the history
Button state must be refreshed after each template_change.
Proxy model counted it wrong (empty items included).
  • Loading branch information
kalisp committed Jul 17, 2024
1 parent 71c5bb2 commit 3eb7b47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/ayon_wrap/workfiles/widgets/files_widget_workarea.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def data(self, index, role=None):
def _on_template_changed(self, event):
self._selected_template_name = event["template_name"]
self._fill_items()
self._controller.emit_event("controller.reset.finished")


class MultiWorkAreaFilesWidget(QtWidgets.QWidget):
Expand Down Expand Up @@ -279,7 +280,7 @@ def __init__(self, controller, parent):
self._change_selection_on_refresh = True

def has_visible_items(self):
return self._proxy_model.rowCount() > 0
return len(self._model._items_by_filename) > 0

def set_text_filter(self, text_filter):
"""Set the text filter.
Expand Down

0 comments on commit 3eb7b47

Please sign in to comment.