mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
make sure the user can't disable all columns
This commit is contained in:
parent
8e00f86234
commit
c4bef937a1
1 changed files with 2 additions and 0 deletions
|
@ -568,6 +568,8 @@ class Browser(QMainWindow):
|
|||
def toggleField(self, type):
|
||||
self.model.beginReset()
|
||||
if type in self.model.activeCols:
|
||||
if len(self.model.activeCols) < 2:
|
||||
return showInfo(_("You must have at least one column."))
|
||||
self.model.activeCols.remove(type)
|
||||
else:
|
||||
self.model.activeCols.append(type)
|
||||
|
|
Loading…
Reference in a new issue