From 3be90c444d0fa21feb51084f8006493966ab0f78 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sun, 27 Dec 2020 08:29:31 +0100 Subject: [PATCH] New field are stripped Otherwise, you can rename "Back" to " Front" and then get unexpected result --- qt/aqt/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt/aqt/fields.py b/qt/aqt/fields.py index fc9235d0e..2319942e4 100644 --- a/qt/aqt/fields.py +++ b/qt/aqt/fields.py @@ -82,7 +82,7 @@ class FieldDialog(QDialog): self.loadField(idx) def _uniqueName(self, prompt, ignoreOrd=None, old=""): - txt = getOnlyText(prompt, default=old).replace('"', "") + txt = getOnlyText(prompt, default=old).replace('"', "").strip() if not txt: return for f in self.model["flds"]: