mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
enable sorting on the extra browser columns
This commit is contained in:
parent
5debd3e0f8
commit
63ce44aaa7
1 changed files with 4 additions and 24 deletions
|
@ -917,31 +917,11 @@ QTableView {{ gridline-color: {grid} }}
|
|||
|
||||
def _onSortChanged(self, idx, ord):
|
||||
type = self.model.activeCols[idx]
|
||||
noSort = ("question", "answer", "template", "deck", "note", "noteTags")
|
||||
noSort = ("question", "answer")
|
||||
if type in noSort:
|
||||
if type == "template":
|
||||
showInfo(
|
||||
_(
|
||||
"""\
|
||||
This column can't be sorted on, but you can search for individual card types, \
|
||||
such as 'card:1'."""
|
||||
)
|
||||
)
|
||||
elif type == "deck":
|
||||
showInfo(
|
||||
_(
|
||||
"""\
|
||||
This column can't be sorted on, but you can search for specific decks \
|
||||
by clicking on one on the left."""
|
||||
)
|
||||
)
|
||||
else:
|
||||
showInfo(
|
||||
_(
|
||||
"Sorting on this column is not supported. Please "
|
||||
"choose another."
|
||||
)
|
||||
)
|
||||
showInfo(
|
||||
_("Sorting on this column is not supported. Please " "choose another.")
|
||||
)
|
||||
type = self.col.conf["sortType"]
|
||||
if self.col.conf["sortType"] != type:
|
||||
self.col.conf["sortType"] = type
|
||||
|
|
Loading…
Reference in a new issue