When changing to a virtual library, refresh the Book Details panel. Fixes #1176296 (Virtual Library - Wrong Book Highlighted When Switching Libraries)

This commit is contained in:
Kovid Goyal 2013-05-04 14:24:10 +05:30
parent 4037971bde
commit d6a8e92dcd

View File

@ -561,6 +561,10 @@ class SearchRestrictionMixin(object):
self.set_number_of_books_shown()
self.current_view().setFocus(Qt.OtherFocusReason)
self.set_window_title()
v = self.current_view()
if not v.currentIndex().isValid():
v.set_current_row()
v.refresh_book_details()
def set_number_of_books_shown(self):
db = self.library_view.model().db