From 3799b8504fca2373bc5e9972662b01c35bf43409 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Tue, 24 Mar 2020 11:54:19 +0100 Subject: [PATCH] strip to test whether field is empty --- qt/aqt/editor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qt/aqt/editor.py b/qt/aqt/editor.py index 31c5d3b8f..77e89ac77 100644 --- a/qt/aqt/editor.py +++ b/qt/aqt/editor.py @@ -496,9 +496,10 @@ class Editor: return True m = self.note.model() for c, f in enumerate(self.note.fields): + f = f.replace("
", "").strip() notChangedvalues = {"", "
"} if previousNote and m["flds"][c]["sticky"]: - notChangedvalues.add(previousNote.fields[c]) + notChangedvalues.add(previousNote.fields[c].replace("
", "").strip()) if f not in notChangedvalues: return False return True