suggest searching when sorting not possible

This commit is contained in:
Damien Elmes 2012-05-14 05:53:26 +09:00
parent 6304f85312
commit 788a2f1989

View file

@ -553,8 +553,17 @@ class Browser(QMainWindow):
type = self.model.activeCols[idx] type = self.model.activeCols[idx]
noSort = ("question", "answer", "template", "deck") noSort = ("question", "answer", "template", "deck")
if type in noSort: if type in noSort:
showInfo(_("Sorting on this column is not supported. Please " if type == "template":
"choose another.")) showInfo(_("""\
This column can't be sorted on, but you can search for individual card types,
such as 'card: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."))
type = self.col.conf['sortType'] type = self.col.conf['sortType']
if self.col.conf['sortType'] != type: if self.col.conf['sortType'] != type:
self.col.conf['sortType'] = type self.col.conf['sortType'] = type