From e1a5bef8967c18c773b506b9c29a9a8849cb8b37 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Fri, 7 Jan 2011 12:41:48 +0000 Subject: [PATCH] Fix scrolling to column zero when clicking on a column to sort. --- src/calibre/gui2/library/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/library/views.py b/src/calibre/gui2/library/views.py index c1dd5b3766..e1e9cf4456 100644 --- a/src/calibre/gui2/library/views.py +++ b/src/calibre/gui2/library/views.py @@ -612,7 +612,7 @@ class BooksView(QTableView): # {{{ if row > -1: h = self.horizontalHeader() for i in range(h.count()): - if not h.isSectionHidden(i): + if not h.isSectionHidden(i) and h.sectionViewportPosition(i) >= 0: self.scrollTo(self.model().index(row, i)) break