mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Make refresh of book details panel after preferences work when there is no current index as well
This commit is contained in:
parent
77141acd8b
commit
4d937e2d5d
@ -971,8 +971,10 @@ class BooksView(QTableView): # {{{
|
||||
rmap = {i:x for i, x in enumerate(self.column_map)}
|
||||
return (rmap[h.visualIndex(x)] for x in logical_indices if h.visualIndex(x) > -1)
|
||||
|
||||
def refresh_book_details(self):
|
||||
def refresh_book_details(self, force=False):
|
||||
idx = self.currentIndex()
|
||||
if not idx.isValid() and force:
|
||||
idx = self.model().index(0, 0)
|
||||
if idx.isValid():
|
||||
self._model.current_changed(idx, idx)
|
||||
return True
|
||||
|
@ -788,7 +788,7 @@ class ConfigWidget(ConfigWidgetBase, Ui_Form):
|
||||
self.update_font_display()
|
||||
gui.tags_view.set_look_and_feel()
|
||||
gui.tags_view.reread_collapse_parameters()
|
||||
gui.library_view.refresh_book_details()
|
||||
gui.library_view.refresh_book_details(force=True)
|
||||
gui.library_view.refresh_grid()
|
||||
gui.library_view.set_row_header_visibility()
|
||||
gui.cover_flow.setShowReflections(gprefs['cover_browser_reflections'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user