View Single Post
Old 09-17-2014, 04:45 PM   #6
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: 12,447
Karma: 8012886
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by DaltonST View Post
I can totally understand and fully support requiring a restart after changing underlying sqlite database structures, such as adding new tables, indexes, views and triggers when a typical custom column is created. It sounds reasonable, though, that a function to merely refresh all custom column data for all books in the GUI without touching any other columns (or anything else) would be quite reasonable.
If all you are doing is changing custom column values then you should be able to refresh the GUI using the same code that bulk metadata edit uses. That code is:
Code:
        if changed:
            refresh_books |= dialog.refresh_books
            m = self.gui.library_view.model()
            if gprefs['refresh_book_list_on_bulk_edit']:
                m.refresh(reset=False)
                m.research()
            else:
                m.refresh_ids(refresh_books)
            self.gui.tags_view.recount()
            if self.gui.cover_flow:
                self.gui.cover_flow.dataChanged()
            self.gui.library_view.select_rows(book_ids)
If that code doesn't work then perhaps you are changing things other than column values?
chaley is offline   Reply With Quote