Workaround for bug in Qt that caused the marked book icon to not always appear immediately after marking a book. Fixes #1404697 [Mark icon appears only after you select another book](https://bugs.launchpad.net/calibre/+bug/1404697)

This commit is contained in:
Kovid Goyal 2014-12-22 11:57:08 +05:30
parent 4a811b931c
commit 83caa9d866

View File

@ -714,6 +714,9 @@ class BooksView(QTableView): # {{{
sections = tuple(x for x in map(f, changed) if x is not None)
if sections:
self.row_header.headerDataChanged(Qt.Vertical, min(sections), max(sections))
# This is needed otherwise Qt does not always update the
# viewport correctly. See https://bugs.launchpad.net/bugs/1404697
self.row_header.viewport().update()
else:
# Marked items have either appeared or all been removed
self.model().set_row_decoration(current_marked)