View Single Post
Old 12-10-2023, 09:10 AM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,768
Karma: 7029857
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by azuravian View Post
Just to clarify, if I delete the entire note from the HTML tab, it does remove the pencil. If I perform a import_note() where the data to import is empty, it removes the content, but does not remove the pencil.

I just tested, and on those where I have cleared the note using the import_note() function, I can open the note, go to HTML and click OK (without changing anything) and the pencil goes away, so there's definitely nothing in there.
I assume you are calling import_note() via your plugin on a book open in the book details pane. Are you telling the GUI that you changed something? Book details won't know otherwise. You can tell the GUI that some field changed using
Code:
gui.do_field_item_value_changed()
I suspect that the pencil will go away if you select a different book then select the original again, which is another way of refreshing the GUI.
chaley is offline   Reply With Quote