From 3eabe4c3f7cf3782239096810d3147f9ce9436ee Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Wed, 17 Jun 2020 11:58:33 +0200 Subject: [PATCH] Strip name of added deck There is currently what I believe to be a bug: create a deck " ". The creation is accepted and the name is renamed to "blank". Instead, I believe you'd want to strip the deck name before testing its emptiness. --- qt/aqt/studydeck.py | 1 + 1 file changed, 1 insertion(+) diff --git a/qt/aqt/studydeck.py b/qt/aqt/studydeck.py index 5f7c465d6..8364b362e 100644 --- a/qt/aqt/studydeck.py +++ b/qt/aqt/studydeck.py @@ -145,6 +145,7 @@ class StudyDeck(QDialog): else: default = self.names[self.form.list.currentRow()] n = getOnlyText(_("New deck name:"), default=default) + n = n.strip() if n: did = self.mw.col.decks.id(n) # deck name may not be the same as user input. ex: ", ::