mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
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:
parent
4a811b931c
commit
83caa9d866
@ -714,6 +714,9 @@ class BooksView(QTableView): # {{{
|
|||||||
sections = tuple(x for x in map(f, changed) if x is not None)
|
sections = tuple(x for x in map(f, changed) if x is not None)
|
||||||
if sections:
|
if sections:
|
||||||
self.row_header.headerDataChanged(Qt.Vertical, min(sections), max(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:
|
else:
|
||||||
# Marked items have either appeared or all been removed
|
# Marked items have either appeared or all been removed
|
||||||
self.model().set_row_decoration(current_marked)
|
self.model().set_row_decoration(current_marked)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user