Bug fix for multiple sort keys
svn: r14679
This commit is contained in:
parent
6802502aeb
commit
669db7237e
@ -584,7 +584,8 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
|||||||
Row is only added if search/filter data is such that it must be shown
|
Row is only added if search/filter data is such that it must be shown
|
||||||
"""
|
"""
|
||||||
data = self.map(handle)
|
data = self.map(handle)
|
||||||
insert_val = (conv_unicode_tosrtkey_ongtk(self.sort_func(data)), handle)
|
insert_val = (map(conv_unicode_tosrtkey_ongtk, self.sort_func(data)),
|
||||||
|
handle)
|
||||||
if not self.search or \
|
if not self.search or \
|
||||||
(self.search and self.search.match(handle, self.db)):
|
(self.search and self.search.match(handle, self.db)):
|
||||||
#row needs to be added to the model
|
#row needs to be added to the model
|
||||||
@ -602,7 +603,8 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
|||||||
"""
|
"""
|
||||||
self.clear_cache(handle)
|
self.clear_cache(handle)
|
||||||
data = self.map(handle)
|
data = self.map(handle)
|
||||||
delete_val = (conv_unicode_tosrtkey_ongtk(self.sort_func(data)), handle)
|
delete_val = (map(conv_unicode_tosrtkey_ongtk, self.sort_func(data)),
|
||||||
|
handle)
|
||||||
delete_path = self.node_map.delete(delete_val)
|
delete_path = self.node_map.delete(delete_val)
|
||||||
#delete_path is an integer from 0 to n-1
|
#delete_path is an integer from 0 to n-1
|
||||||
if delete_path is not None:
|
if delete_path is not None:
|
||||||
@ -614,7 +616,7 @@ class FlatBaseModel(gtk.GenericTreeModel):
|
|||||||
"""
|
"""
|
||||||
self.clear_cache(handle)
|
self.clear_cache(handle)
|
||||||
oldsortkey = self.node_map.get_sortkey(handle)
|
oldsortkey = self.node_map.get_sortkey(handle)
|
||||||
newsortkey = conv_unicode_tosrtkey_ongtk(self.sort_func(self.map(
|
newsortkey = map(conv_unicode_tosrtkey_ongtk, self.sort_func(self.map(
|
||||||
handle)))
|
handle)))
|
||||||
if oldsortkey is None or oldsortkey != newsortkey:
|
if oldsortkey is None or oldsortkey != newsortkey:
|
||||||
#or the changed object is not present in the view due to filtering
|
#or the changed object is not present in the view due to filtering
|
||||||
|
Loading…
Reference in New Issue
Block a user