7930: Fix removing rows in flat list views
This commit is contained in:
parent
71ae1fbca3
commit
0163a8528c
@ -577,7 +577,11 @@ class FlatBaseModel(GObject.GObject, Gtk.TreeModel):
|
|||||||
# use cursor as a context manager
|
# use cursor as a context manager
|
||||||
with self.gen_cursor() as cursor:
|
with self.gen_cursor() as cursor:
|
||||||
#loop over database and store the sort field, and the handle
|
#loop over database and store the sort field, and the handle
|
||||||
srt_keys=[(self.sort_func(data), key) for key, data in cursor]
|
if sys.version_info[0] >= 3:
|
||||||
|
srt_keys=[(self.sort_func(data), key.decode('utf8'))
|
||||||
|
for key, data in cursor]
|
||||||
|
else:
|
||||||
|
srt_keys=[(self.sort_func(data), key) for key, data in cursor]
|
||||||
srt_keys.sort()
|
srt_keys.sort()
|
||||||
return srt_keys
|
return srt_keys
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user