7930: Fix removing rows in flat list views

This commit is contained in:
Nick Hall 2015-02-08 19:50:03 +00:00
parent 71ae1fbca3
commit 0163a8528c

View File

@ -577,7 +577,11 @@ class FlatBaseModel(GObject.GObject, Gtk.TreeModel):
# use cursor as a context manager
with self.gen_cursor() as cursor:
#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()
return srt_keys