mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
change order of filters
This commit is contained in:
parent
a394624974
commit
922d19137c
1 changed files with 8 additions and 9 deletions
|
|
@ -350,6 +350,14 @@ class ProjectSortFilterProxy(QtCore.QSortFilterProxyModel):
|
||||||
if project_name is None:
|
if project_name is None:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
# Make sure current project is visible
|
||||||
|
if index.data(PROJECT_IS_CURRENT_ROLE):
|
||||||
|
return True
|
||||||
|
|
||||||
|
default = super().filterAcceptsRow(source_row, source_parent)
|
||||||
|
if not default:
|
||||||
|
return default
|
||||||
|
|
||||||
string_pattern = self.filterRegularExpression().pattern()
|
string_pattern = self.filterRegularExpression().pattern()
|
||||||
if (
|
if (
|
||||||
string_pattern
|
string_pattern
|
||||||
|
|
@ -357,15 +365,6 @@ class ProjectSortFilterProxy(QtCore.QSortFilterProxyModel):
|
||||||
):
|
):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
# Current project keep always visible
|
|
||||||
default = super().filterAcceptsRow(source_row, source_parent)
|
|
||||||
if not default:
|
|
||||||
return default
|
|
||||||
|
|
||||||
# Make sure current project is visible
|
|
||||||
if index.data(PROJECT_IS_CURRENT_ROLE):
|
|
||||||
return True
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
self._filter_inactive
|
self._filter_inactive
|
||||||
and not index.data(PROJECT_IS_ACTIVE_ROLE)
|
and not index.data(PROJECT_IS_ACTIVE_ROLE)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue