From 653bc1798e084b1dfd1fe98b2dbe8e54aac9b6ef Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Mon, 1 Oct 2007 08:46:37 +0000 Subject: [PATCH] 2007-10-01 Benny Malengier * src/GrampsDb/_DbUtils.py: do deep copy of bookmarks from old to new db * src/GrampsDb/_GrampsXMLDB.py: in load_from: load correct bookmarks svn: r9050 --- ChangeLog | 4 ++++ src/GrampsDb/_DbUtils.py | 15 ++++++++------- src/GrampsDb/_GrampsXMLDB.py | 1 - 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index ae4a7fcea..9ab794404 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-10-01 Benny Malengier + * src/GrampsDb/_DbUtils.py: do deep copy of bookmarks from old to new db + * src/GrampsDb/_GrampsXMLDB.py: in load_from: load correct bookmarks + 2007-09-30 Stephane Charette * src/data/main*.css: 0001266: Narrative web report: gallery images don't show up correctly in IE7 diff --git a/src/GrampsDb/_DbUtils.py b/src/GrampsDb/_DbUtils.py index cce56450b..2508c024a 100644 --- a/src/GrampsDb/_DbUtils.py +++ b/src/GrampsDb/_DbUtils.py @@ -21,6 +21,7 @@ # $Id: __init__.py 6086 2006-03-06 03:54:58Z dallingham $ from gettext import gettext as _ +import copy import RelLib from BasicUtils import UpdateCallback @@ -263,13 +264,13 @@ def db_copy(from_db,to_db,callback): # Copy bookmarks over: # we already know that there's no overlap in handles anywhere - to_db.bookmarks = from_db.bookmarks - to_db.family_bookmarks = from_db.family_bookmarks - to_db.event_bookmarks = from_db.event_bookmarks - to_db.source_bookmarks = from_db.source_bookmarks - to_db.place_bookmarks = from_db.place_bookmarks - to_db.media_bookmarks = from_db.media_bookmarks - to_db.repo_bookmarks = from_db.repo_bookmarks + to_db.bookmarks = copy.deepcopy(from_db.bookmarks) + to_db.family_bookmarks = copy.deepcopy(from_db.family_bookmarks) + to_db.event_bookmarks = copy.deepcopy(from_db.event_bookmarks) + to_db.source_bookmarks = copy.deepcopy(from_db.source_bookmarks) + to_db.place_bookmarks = copy.deepcopy(from_db.place_bookmarks) + to_db.media_bookmarks = copy.deepcopy(from_db.media_bookmarks) + to_db.repo_bookmarks = copy.deepcopy(from_db.repo_bookmarks) # Copy name formats to_db.name_formats = from_db.name_formats diff --git a/src/GrampsDb/_GrampsXMLDB.py b/src/GrampsDb/_GrampsXMLDB.py index b7c714690..4ae55645b 100644 --- a/src/GrampsDb/_GrampsXMLDB.py +++ b/src/GrampsDb/_GrampsXMLDB.py @@ -65,7 +65,6 @@ class GrampsXMLDB(GrampsInMemDB): self.id_trans = {} db_copy(other_database,self,callback) GrampsInMemDB.load(self,filename,callback) - self.bookmarks.set(self.metadata.get('bookmarks',[])) self.db_is_open = True quick_write(self,self.full_name,callback) return 1