From bcf87dec1060d1dfef2e8d4249f4ebee698829ba Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Mon, 28 Jul 2025 15:01:12 +0200 Subject: [PATCH] Removed unnecessary _library_only --- client/ayon_core/tools/push_to_project/control.py | 8 -------- client/ayon_core/tools/push_to_project/ui/window.py | 6 ++---- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/client/ayon_core/tools/push_to_project/control.py b/client/ayon_core/tools/push_to_project/control.py index f24d11d0b7..eb985a3f8c 100644 --- a/client/ayon_core/tools/push_to_project/control.py +++ b/client/ayon_core/tools/push_to_project/control.py @@ -130,14 +130,6 @@ class PushToContextController: self._src_label = self._prepare_source_label() return self._src_label - def get_library_only(self): - """Returns state of library filter""" - return self._library_only - - def set_library_only(self, state: bool): - """Change state of library filter""" - self._library_only = state - def get_project_items(self, sender=None): return self._projects_model.get_project_items(sender) diff --git a/client/ayon_core/tools/push_to_project/ui/window.py b/client/ayon_core/tools/push_to_project/ui/window.py index 49093b8a00..6b0363adee 100644 --- a/client/ayon_core/tools/push_to_project/ui/window.py +++ b/client/ayon_core/tools/push_to_project/ui/window.py @@ -85,13 +85,12 @@ class PushToContextSelectWindow(QtWidgets.QWidget): header_widget = QtWidgets.QWidget(main_context_widget) - library_only = self._controller.get_library_only() library_only_label = QtWidgets.QLabel( "Show only libraries", header_widget ) library_only_checkbox = NiceCheckbox( - library_only, parent=header_widget) + True, parent=header_widget) header_label = QtWidgets.QLabel( controller.get_source_label(), @@ -113,7 +112,7 @@ class PushToContextSelectWindow(QtWidgets.QWidget): projects_combobox = ProjectsCombobox(controller, context_widget) projects_combobox.set_select_item_visible(True) - projects_combobox.set_standard_filter_enabled(library_only) + projects_combobox.set_standard_filter_enabled(True) context_splitter = QtWidgets.QSplitter( QtCore.Qt.Vertical, context_widget @@ -409,7 +408,6 @@ class PushToContextSelectWindow(QtWidgets.QWidget): def _on_library_only_change(self, state: int) -> None: """Change toggle state, reset filter, recalculate dropdown""" state = bool(state) - self._controller.set_library_only(state) self._projects_combobox.set_standard_filter_enabled(state) self._projects_combobox.refresh()