From a45267eaf4afff1016a252ea4c85f60613f09478 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 2 Nov 2023 16:50:24 +0530 Subject: [PATCH] fix notes editor changes in the HTML view not being saved until switching back to th enormal view --- src/calibre/gui2/dialogs/edit_category_notes.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/dialogs/edit_category_notes.py b/src/calibre/gui2/dialogs/edit_category_notes.py index 6da7771188..4486661ece 100644 --- a/src/calibre/gui2/dialogs/edit_category_notes.py +++ b/src/calibre/gui2/dialogs/edit_category_notes.py @@ -283,7 +283,10 @@ class NoteEditor(Editor): def get_doc(self): self.editor.referenced_resources = set() self.editor.searchable_text = '' + idx = self.tabs.currentIndex() + self.tabs.setCurrentIndex(0) html = self.editor.html + self.tabs.setCurrentIndex(idx) return html, self.editor.searchable_text, self.editor.referenced_resources, self.editor.images.values() def export_note(self):