Fix scrolling to column zero when clicking on a column to sort.

This commit is contained in:
Charles Haley 2011-01-07 12:41:48 +00:00
parent 21392dc27c
commit e1a5bef896

View File

@ -612,7 +612,7 @@ class BooksView(QTableView): # {{{
if row > -1: if row > -1:
h = self.horizontalHeader() h = self.horizontalHeader()
for i in range(h.count()): 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)) self.scrollTo(self.model().index(row, i))
break break