mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
initial state of product name filtering are propagated
This commit is contained in:
parent
8ee87c9d26
commit
c6e5a8ec11
1 changed files with 9 additions and 0 deletions
|
|
@ -16,6 +16,8 @@ ITEM_SUBTYPE_ROLE = QtCore.Qt.UserRole + 3
|
||||||
|
|
||||||
|
|
||||||
class ProductTypesQtModel(BaseQtModel):
|
class ProductTypesQtModel(BaseQtModel):
|
||||||
|
refreshed = QtCore.Signal()
|
||||||
|
|
||||||
def __init__(self, controller):
|
def __init__(self, controller):
|
||||||
self._reset_filters_on_refresh = True
|
self._reset_filters_on_refresh = True
|
||||||
self._refreshing = False
|
self._refreshing = False
|
||||||
|
|
@ -38,6 +40,7 @@ class ProductTypesQtModel(BaseQtModel):
|
||||||
|
|
||||||
self._reset_filters_on_refresh = False
|
self._reset_filters_on_refresh = False
|
||||||
self._refreshing = False
|
self._refreshing = False
|
||||||
|
self.refreshed.emit()
|
||||||
|
|
||||||
def reset_product_types_filter_on_refresh(self):
|
def reset_product_types_filter_on_refresh(self):
|
||||||
self._reset_filters_on_refresh = True
|
self._reset_filters_on_refresh = True
|
||||||
|
|
@ -120,6 +123,9 @@ class ProductTypesCombobox(CustomPaintMultiselectComboBox):
|
||||||
model=model,
|
model=model,
|
||||||
parent=parent
|
parent=parent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
model.refreshed.connect(self._on_model_refresh)
|
||||||
|
|
||||||
self.set_placeholder_text("Product types filter...")
|
self.set_placeholder_text("Product types filter...")
|
||||||
self._model = model
|
self._model = model
|
||||||
self._last_project_name = None
|
self._last_project_name = None
|
||||||
|
|
@ -141,6 +147,9 @@ class ProductTypesCombobox(CustomPaintMultiselectComboBox):
|
||||||
def reset_product_types_filter_on_refresh(self):
|
def reset_product_types_filter_on_refresh(self):
|
||||||
self._model.reset_product_types_filter_on_refresh()
|
self._model.reset_product_types_filter_on_refresh()
|
||||||
|
|
||||||
|
def _on_model_refresh(self):
|
||||||
|
self.value_changed.emit()
|
||||||
|
|
||||||
def _on_product_type_filter_change(self):
|
def _on_product_type_filter_change(self):
|
||||||
lines = ["Product types filter"]
|
lines = ["Product types filter"]
|
||||||
for item in self.get_value_info():
|
for item in self.get_value_info():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue