mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
use selected deck as default when creating new
This commit is contained in:
parent
4aaa85cfb0
commit
309f322fc6
1 changed files with 6 additions and 1 deletions
|
@ -109,7 +109,12 @@ class StudyDeck(QDialog):
|
|||
QDialog.reject(self)
|
||||
|
||||
def onAddDeck(self):
|
||||
n = getOnlyText(_("New deck name:"), default=self.form.filter.text())
|
||||
row = self.form.list.currentRow()
|
||||
if row < 0:
|
||||
default = self.form.filter.text()
|
||||
else:
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue