mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
fix deleting deck configs
This commit is contained in:
parent
335815ab9c
commit
683f664d85
2 changed files with 4 additions and 2 deletions
|
@ -251,6 +251,7 @@ crt=?, mod=?, scm=?, dty=?, usn=?, ls=?""",
|
|||
raise AnkiError("abortSchemaMod")
|
||||
self.scm = intTime(1000)
|
||||
self.setMod()
|
||||
self.save()
|
||||
|
||||
def schemaChanged(self) -> Any:
|
||||
"True if schema changed since last sync."
|
||||
|
|
|
@ -131,15 +131,16 @@ class DeckConf(QDialog):
|
|||
# then reload the conf list
|
||||
self.loadConfs()
|
||||
|
||||
def remGroup(self):
|
||||
def remGroup(self) -> None:
|
||||
if int(self.conf["id"]) == 1:
|
||||
showInfo(_("The default configuration can't be removed."), self)
|
||||
else:
|
||||
self.mw.col.modSchema(check=True)
|
||||
self.mw.col.decks.remove_config(self.conf["id"])
|
||||
self.deck["conf"] = 1
|
||||
self.loadConfs()
|
||||
|
||||
def renameGroup(self):
|
||||
def renameGroup(self) -> None:
|
||||
old = self.conf["name"]
|
||||
name = getOnlyText(_("New name:"), default=old)
|
||||
if not name or name == old:
|
||||
|
|
Loading…
Reference in a new issue