Fields are blank compare to previous note
So if a note is not empty but only because sticky fields didn't change, then it's considered as empty and we can close the windows without asking
This commit is contained in:
parent
f41014ca4b
commit
d598434bde
@ -371,12 +371,15 @@ class Editor:
|
||||
contents))
|
||||
browser.onSearchActivated()
|
||||
|
||||
def fieldsAreBlank(self):
|
||||
def fieldsAreBlank(self, previousNote=None):
|
||||
if not self.note:
|
||||
return True
|
||||
m = self.note.model()
|
||||
for c, f in enumerate(self.note.fields):
|
||||
if f and not m['flds'][c]['sticky']:
|
||||
notChangedvalues = {"", "<br>"}
|
||||
if previousNote and m['flds'][c]['sticky']:
|
||||
notChangedvalues.add(previousNote.fields[c])
|
||||
if f not in notChangedvalues:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user