View Single Post
Old 12-15-2020, 07:50 AM   #11
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,221
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by DaltonST View Post
I have been using db.add_book() for years, along with the IPC call plus self.maingui.library_view.model().refresh_ids(ids)


I am now using self.maingui.library_view.model().refresh(), instead of .refresh_ids(ids), which solves my problem of not using IPC any longer. Works fine.



Thank you for your kind advice.




DaltonST

I have a GUI plugin that uses refresh_ids(ids), but I also use another parameter to refresh the Book Details Panel for the currently selected book:

Code:
self.gui.library_view.model().refresh_ids(ids, current_row=self.gui.library_view.currentIndex().row())
Without this, when the books are added, the book list is refreshed, but not the Book Details Panel (it will keep showing the last selected book before adding the new books).
thiago.eec is offline   Reply With Quote