mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -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")
|
raise AnkiError("abortSchemaMod")
|
||||||
self.scm = intTime(1000)
|
self.scm = intTime(1000)
|
||||||
self.setMod()
|
self.setMod()
|
||||||
|
self.save()
|
||||||
|
|
||||||
def schemaChanged(self) -> Any:
|
def schemaChanged(self) -> Any:
|
||||||
"True if schema changed since last sync."
|
"True if schema changed since last sync."
|
||||||
|
|
|
@ -131,15 +131,16 @@ class DeckConf(QDialog):
|
||||||
# then reload the conf list
|
# then reload the conf list
|
||||||
self.loadConfs()
|
self.loadConfs()
|
||||||
|
|
||||||
def remGroup(self):
|
def remGroup(self) -> None:
|
||||||
if int(self.conf["id"]) == 1:
|
if int(self.conf["id"]) == 1:
|
||||||
showInfo(_("The default configuration can't be removed."), self)
|
showInfo(_("The default configuration can't be removed."), self)
|
||||||
else:
|
else:
|
||||||
|
self.mw.col.modSchema(check=True)
|
||||||
self.mw.col.decks.remove_config(self.conf["id"])
|
self.mw.col.decks.remove_config(self.conf["id"])
|
||||||
self.deck["conf"] = 1
|
self.deck["conf"] = 1
|
||||||
self.loadConfs()
|
self.loadConfs()
|
||||||
|
|
||||||
def renameGroup(self):
|
def renameGroup(self) -> None:
|
||||||
old = self.conf["name"]
|
old = self.conf["name"]
|
||||||
name = getOnlyText(_("New name:"), default=old)
|
name = getOnlyText(_("New name:"), default=old)
|
||||||
if not name or name == old:
|
if not name or name == old:
|
||||||
|
|
Loading…
Reference in a new issue