Avoid detach model problem when reversing a column sort
svn: r14219
This commit is contained in:
parent
3b6552f62d
commit
65d03d2556
@ -593,7 +593,6 @@ class ListView(NavigationView):
|
|||||||
filter_info = (False, value, False)
|
filter_info = (False, value, False)
|
||||||
|
|
||||||
if same_col:
|
if same_col:
|
||||||
self.list.set_model(None)
|
|
||||||
self.model.reverse_order()
|
self.model.reverse_order()
|
||||||
else:
|
else:
|
||||||
self.model = self.make_model(self.dbstate.db, self.sort_col,
|
self.model = self.make_model(self.dbstate.db, self.sort_col,
|
||||||
@ -602,6 +601,7 @@ class ListView(NavigationView):
|
|||||||
sort_map=self.column_order())
|
sort_map=self.column_order())
|
||||||
|
|
||||||
self.list.set_model(self.model)
|
self.list.set_model(self.model)
|
||||||
|
|
||||||
self.__display_column_sort()
|
self.__display_column_sort()
|
||||||
|
|
||||||
if handle:
|
if handle:
|
||||||
|
@ -628,6 +628,8 @@ class TreeBaseModel(gtk.GenericTreeModel):
|
|||||||
model to the view.
|
model to the view.
|
||||||
"""
|
"""
|
||||||
self.__reverse = not self.__reverse
|
self.__reverse = not self.__reverse
|
||||||
|
top_node = self.tree[None]
|
||||||
|
self._reverse_level(top_node)
|
||||||
|
|
||||||
def _reverse_level(self, node):
|
def _reverse_level(self, node):
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user