Position the selected line on the library view in the center instead of at the edge

This commit is contained in:
Charles Haley 2011-04-15 08:18:59 +01:00
parent 44123efeff
commit 3e05f78637

View File

@ -631,7 +631,7 @@ class BooksView(QTableView): # {{{
h = self.horizontalHeader()
for i in range(h.count()):
if not h.isSectionHidden(i) and h.sectionViewportPosition(i) >= 0:
self.scrollTo(self.model().index(row, i))
self.scrollTo(self.model().index(row, i), self.PositionAtCenter)
break
def set_current_row(self, row, select=True):