mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 15:17:12 -05:00
Revert "Make sidebar search matching work with full_name instead of name"
This reverts commit 6850e0f78e.
Using the full name caused issues with highlighting:
https://github.com/ankitects/anki/pull/951#issuecomment-769516003
Let's revert this for now and see if demand presents itself.
This commit is contained in:
parent
151cf52718
commit
57c53632a6
1 changed files with 1 additions and 4 deletions
|
|
@ -140,7 +140,7 @@ class SidebarModel(QAbstractItemModel):
|
|||
if not index.isValid():
|
||||
return QVariant()
|
||||
|
||||
if role not in (Qt.DisplayRole, Qt.DecorationRole, Qt.ToolTipRole, Qt.EditRole):
|
||||
if role not in (Qt.DisplayRole, Qt.DecorationRole, Qt.ToolTipRole):
|
||||
return QVariant()
|
||||
|
||||
item: SidebarItem = index.internalPointer()
|
||||
|
|
@ -149,8 +149,6 @@ class SidebarModel(QAbstractItemModel):
|
|||
return QVariant(item.name)
|
||||
elif role == Qt.ToolTipRole:
|
||||
return QVariant(item.tooltip)
|
||||
elif role == Qt.EditRole:
|
||||
return QVariant(item.full_name)
|
||||
else:
|
||||
return QVariant(theme_manager.icon_from_resources(item.icon))
|
||||
|
||||
|
|
@ -277,7 +275,6 @@ class SidebarTreeView(QTreeView):
|
|||
filter_model.setSourceModel(self.model())
|
||||
filter_model.setFilterCaseSensitivity(False) # type: ignore
|
||||
filter_model.setRecursiveFilteringEnabled(True)
|
||||
filter_model.setFilterRole(Qt.EditRole)
|
||||
self.setModel(filter_model)
|
||||
else:
|
||||
filter_model = self.model()
|
||||
|
|
|
|||
Loading…
Reference in a new issue