From 21d02ad22ca99af8d080daf8aea0739835559992 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Sat, 4 Jun 2016 21:36:08 -0700 Subject: [PATCH] implement fetching sorted Person and Family handles in the proxy DBs --- gramps/gen/proxy/proxybase.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gramps/gen/proxy/proxybase.py b/gramps/gen/proxy/proxybase.py index 960e7909c..a68c63f02 100644 --- a/gramps/gen/proxy/proxybase.py +++ b/gramps/gen/proxy/proxybase.py @@ -320,9 +320,10 @@ class ProxyDbBase(DbReadBase): Return a list of database handles, one handle for each Person in the database. If sort_handles is True, the list is sorted by surnames """ - # FIXME: this is not a sorted list of handles if self.db.is_open: - return list(self.iter_person_handles()) + proxied = set(self.iter_person_handles()) + all = self.basedb.get_person_handles(sort_handles=sort_handles) + return [hdl for hdl in all if str(hdl, 'utf-8') in proxied] else: return [] @@ -331,9 +332,10 @@ class ProxyDbBase(DbReadBase): Return a list of database handles, one handle for each Family in the database. If sort_handles is True, the list is sorted by surnames """ - # FIXME: this is not a sorted list of handles if self.db.is_open: - return list(self.iter_family_handles()) + proxied = set(self.iter_family_handles()) + all = self.basedb.get_family_handles(sort_handles=sort_handles) + return [hdl for hdl in all if str(hdl, 'utf-8') in proxied] else: return []