Avoid detach model problem when reversing a column sort

svn: r14219
This commit is contained in:
Nick Hall 2010-02-04 23:33:47 +00:00
parent 3b6552f62d
commit 65d03d2556
2 changed files with 5 additions and 3 deletions

View File

@ -593,15 +593,15 @@ class ListView(NavigationView):
filter_info = (False, value, False)
if same_col:
self.list.set_model(None)
self.model.reverse_order()
else:
self.model = self.make_model(self.dbstate.db, self.sort_col,
self.sort_order,
search=filter_info,
sort_map=self.column_order())
self.list.set_model(self.model)
self.list.set_model(self.model)
self.__display_column_sort()
if handle:

View File

@ -628,6 +628,8 @@ class TreeBaseModel(gtk.GenericTreeModel):
model to the view.
"""
self.__reverse = not self.__reverse
top_node = self.tree[None]
self._reverse_level(top_node)
def _reverse_level(self, node):
"""