Fix EditEventRef, EditPlaceRef, EditMediaRef, EditRepoRef for improperly (#1112)
saving objects in their object lists. Fixes #11917, #11933
This commit is contained in:
parent
bd6e7c1007
commit
9938c71a1c
@ -26,7 +26,7 @@
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
from copy import deepcopy
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# gramps modules
|
||||
@ -66,7 +66,7 @@ class EditEventRef(EditReference):
|
||||
def __init__(self, state, uistate, track, event, event_ref, update):
|
||||
EditReference.__init__(self, state, uistate, track, event, event_ref,
|
||||
update)
|
||||
self.original = event.serialize()
|
||||
self.original = deepcopy(event.serialize())
|
||||
self._init_event()
|
||||
|
||||
def _local_init(self):
|
||||
|
@ -29,6 +29,7 @@
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
import os
|
||||
from copy import deepcopy
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -85,7 +86,7 @@ class EditMediaRef(EditReference):
|
||||
AddMedia(state, self.uistate, self.track, self.source,
|
||||
self._update_addmedia)
|
||||
else:
|
||||
self.original = self.source.serialize()
|
||||
self.original = deepcopy(self.source.serialize())
|
||||
|
||||
def _local_init(self):
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
|
||||
from copy import deepcopy
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# Gramps modules
|
||||
@ -51,7 +51,7 @@ class EditPlaceRef(EditReference):
|
||||
def __init__(self, state, uistate, track, place, place_ref, update):
|
||||
EditReference.__init__(self, state, uistate, track, place, place_ref,
|
||||
update)
|
||||
self.original = place.serialize()
|
||||
self.original = deepcopy(place.serialize())
|
||||
|
||||
def _local_init(self):
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
# Python modules
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
from copy import deepcopy
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# gramps modules
|
||||
@ -51,7 +51,7 @@ class EditRepoRef(EditReference):
|
||||
|
||||
EditReference.__init__(self, state, uistate, track, source,
|
||||
source_ref, update)
|
||||
self.original = source.serialize()
|
||||
self.original = deepcopy(source.serialize())
|
||||
|
||||
def _local_init(self):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user