From 83caa9d866e9b7e38f3865530f02c16b0e54a9a0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 22 Dec 2014 11:57:08 +0530 Subject: [PATCH] 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) --- src/calibre/gui2/library/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index 82bd6f8092..66e9cb36f1 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -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)