Faster place list building
svn: r4496
This commit is contained in:
parent
185bad6307
commit
295ecc8d8e
@ -1,3 +1,7 @@
|
||||
2005-05-06 Don Allingham <dona@gramps-project.org>
|
||||
* src/ReadXML.py: fix handling of non-gregorian dates
|
||||
* src/EditPerson.py: faster building of place lists using cursors
|
||||
|
||||
2005-05-06 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||
* src/gramps_main.py (undo): Block signals during undo to make
|
||||
it MUCH faster when undoing larger imports or plugin runs
|
||||
|
@ -122,9 +122,7 @@ class EditPerson:
|
||||
person.get_gender () ==
|
||||
RelLib.Person.UNKNOWN)
|
||||
|
||||
for key in db.get_place_handles():
|
||||
p = db.get_place_from_handle(key).get_display_info()
|
||||
self.pdmap[p[0]] = key
|
||||
self.build_pdmap()
|
||||
|
||||
mod = not self.db.readonly
|
||||
|
||||
@ -534,6 +532,15 @@ class EditPerson:
|
||||
|
||||
self.window.show()
|
||||
|
||||
def build_pdmap(self):
|
||||
self.pdmap.clear()
|
||||
cursor = self.db.get_place_cursor()
|
||||
data = cursor.next()
|
||||
while data:
|
||||
self.pdmap[data[1][2]] = data[0]
|
||||
data = cursor.next()
|
||||
cursor.close()
|
||||
|
||||
def image_button_press(self,obj,event):
|
||||
if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1:
|
||||
|
||||
@ -1759,10 +1766,7 @@ class EditPerson:
|
||||
if nick != self.person.get_nick_name():
|
||||
self.person.set_nick_name(nick)
|
||||
|
||||
self.pdmap.clear()
|
||||
for key in self.db.get_place_handles():
|
||||
p = self.db.get_place_from_handle(key).get_display_info()
|
||||
self.pdmap[p[0]] = key
|
||||
self.build_pdmap()
|
||||
|
||||
if not self.orig_birth.are_equal(self.birth):
|
||||
if self.orig_birth.is_empty():
|
||||
|
Loading…
x
Reference in New Issue
Block a user