Don't uneccessarily scroll the bok list horizontally

This commit is contained in:
Kovid Goyal 2011-01-07 13:05:16 -07:00
parent 65ddab2074
commit 19bf985c14

View File

@ -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