Fix switching to an empty virtual library not blanking the book details panel

This commit is contained in:
Kovid Goyal 2013-09-18 21:36:10 +05:30
parent 3ab5097788
commit f59d90e68e
2 changed files with 4 additions and 1 deletions

View File

@ -763,6 +763,8 @@ class BooksView(QTableView): # {{{
idx = self.currentIndex()
if idx.isValid():
self._model.current_changed(idx, idx)
return True
return False
def scrollContentsBy(self, dx, dy):
# Needed as Qt bug causes headerview to not always update when scrolling

View File

@ -587,7 +587,8 @@ class SearchRestrictionMixin(object):
v = self.current_view()
if not v.currentIndex().isValid():
v.set_current_row()
v.refresh_book_details()
if not v.refresh_book_details():
self.book_details.reset_info()
def set_number_of_books_shown(self):
db = self.library_view.model().db