add saveGeom and restoreGeom to htmlEditor

This commit is contained in:
sandersantema 2020-05-27 12:04:00 +02:00
parent 835d1eb994
commit 3407fb7b2b

View File

@ -32,6 +32,8 @@ from aqt.utils import (
getFile, getFile,
openHelp, openHelp,
qtMenuShortcutWorkaround, qtMenuShortcutWorkaround,
restoreGeom,
saveGeom,
shortcut, shortcut,
showInfo, showInfo,
showWarning, showWarning,
@ -523,6 +525,7 @@ class Editor:
d = QDialog(self.widget) d = QDialog(self.widget)
form = aqt.forms.edithtml.Ui_Dialog() form = aqt.forms.edithtml.Ui_Dialog()
form.setupUi(d) form.setupUi(d)
restoreGeom(d, "htmlEditor")
qconnect(form.buttonBox.helpRequested, lambda: openHelp("editor")) qconnect(form.buttonBox.helpRequested, lambda: openHelp("editor"))
form.textEdit.setPlainText(self.note.fields[field]) form.textEdit.setPlainText(self.note.fields[field])
d.show() d.show()
@ -540,6 +543,7 @@ class Editor:
if not self.addMode: if not self.addMode:
self.note.flush() self.note.flush()
self.loadNote(focusTo=field) self.loadNote(focusTo=field)
saveGeom(d, "htmlEditor")
# Tag handling # Tag handling
###################################################################### ######################################################################