mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
Merge pull request #1253 from ynput/bugfix/projects-filtering
Launcher tool: Check for all project filters
This commit is contained in:
commit
62b835faf8
1 changed files with 11 additions and 11 deletions
|
|
@ -350,21 +350,21 @@ class ProjectSortFilterProxy(QtCore.QSortFilterProxyModel):
|
|||
if project_name is None:
|
||||
return True
|
||||
|
||||
string_pattern = self.filterRegularExpression().pattern()
|
||||
if string_pattern:
|
||||
return string_pattern.lower() in project_name.lower()
|
||||
|
||||
# Current project keep always visible
|
||||
default = super(ProjectSortFilterProxy, self).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
|
||||
|
||||
default = super().filterAcceptsRow(source_row, source_parent)
|
||||
if not default:
|
||||
return default
|
||||
|
||||
string_pattern = self.filterRegularExpression().pattern()
|
||||
if (
|
||||
string_pattern
|
||||
and string_pattern.lower() not in project_name.lower()
|
||||
):
|
||||
return False
|
||||
|
||||
if (
|
||||
self._filter_inactive
|
||||
and not index.data(PROJECT_IS_ACTIVE_ROLE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue