make sure to preserve focus when reloading on editFocusLost

This commit is contained in:
Damien Elmes 2017-12-04 12:03:01 +10:00
parent 84dd488d21
commit 15e102e047

View File

@ -245,7 +245,7 @@ class Editor:
"editFocusLost", False, self.note, ord):
# something updated the note; update it after a subsequent focus
# event has had time to fire
self.mw.progress.timer(100, self.loadNote, False)
self.mw.progress.timer(100, self.loadNoteKeepingFocus, False)
else:
self.checkValid()
else:
@ -279,6 +279,9 @@ class Editor:
if hide:
self.widget.hide()
def loadNoteKeepingFocus(self):
self.loadNote(self.currentField)
def loadNote(self, focusTo=None):
if not self.note:
return