Fix possible problem with refreshing device view. If the view had never been sorted, then refresh would not call reset. This might explain the kobo refresh problem.

This commit is contained in:
Charles Haley 2010-09-15 22:28:57 +01:00
parent 45cf7ac5ea
commit 88a56dc648

View File

@ -1027,7 +1027,9 @@ class DeviceBooksModel(BooksModel): # {{{
def resort(self, reset=True): def resort(self, reset=True):
if self.sorted_on: if self.sorted_on:
self.sort(self.column_map.index(self.sorted_on[0]), self.sort(self.column_map.index(self.sorted_on[0]),
self.sorted_on[1], reset=reset) self.sorted_on[1], reset=False)
if reset:
self.reset()
def columnCount(self, parent): def columnCount(self, parent):
if parent and parent.isValid(): if parent and parent.isValid():