get deck name after adding deck

This commit is contained in:
BlueGreenMagick 2020-06-11 12:50:17 +09:00
parent 816cec4a58
commit 4e6ba4df78

View File

@ -146,8 +146,9 @@ class StudyDeck(QDialog):
default = self.names[self.form.list.currentRow()]
n = getOnlyText(_("New deck name:"), default=default)
if n:
self.mw.col.decks.id(n)
self.name = n
did = self.mw.col.decks.id(n)
# deck name may not be the same as user input. ex: ", ::
self.name = self.mw.col.decks.name(did)
# make sure we clean up reset hook when manually exiting
gui_hooks.state_did_reset.remove(self.onReset)
QDialog.accept(self)