Avoid detach model problem when reversing a column sort
svn: r14219
This commit is contained in:
parent
3b6552f62d
commit
65d03d2556
@ -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:
|
||||
|
@ -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):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user