mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
strip trailing whitespace from profile names
This commit is contained in:
parent
09559c35c8
commit
e895d73029
1 changed files with 1 additions and 0 deletions
|
@ -162,6 +162,7 @@ class AnkiQt(QMainWindow):
|
||||||
def onAddProfile(self):
|
def onAddProfile(self):
|
||||||
name = getOnlyText(_("Name:"))
|
name = getOnlyText(_("Name:"))
|
||||||
if name:
|
if name:
|
||||||
|
name = name.strip()
|
||||||
if name in self.pm.profiles():
|
if name in self.pm.profiles():
|
||||||
return showWarning(_("Name exists."))
|
return showWarning(_("Name exists."))
|
||||||
if not self.profileNameOk(name):
|
if not self.profileNameOk(name):
|
||||||
|
|
Loading…
Reference in a new issue