4198: Person view does not remove a row correctly when two people are merged.

This patch improves on the context changes:
 * avoid use of transaction_xx methods
 * force an abort in case of unclean transaction

Backward compatibility is broken to achieve this.


svn: r16680
This commit is contained in:
Benny Malengier
2011-02-20 10:52:06 +00:00
parent cce4013b44
commit 752d594571
47 changed files with 205 additions and 129 deletions

View File

@ -47,6 +47,7 @@ import pango
#
#-------------------------------------------------------------------------
import gen.lib
from gen.db import DbTxn
from gui.views.navigationview import NavigationView
from gui.editors import EditPerson, EditFamily
from gui.filtereditor import FilterEditor
@ -1500,8 +1501,7 @@ class RelationshipView(NavigationView):
family = self.dbstate.db.get_family_from_handle(family_handle)
family.add_child_ref(ref)
with self.dbstate.db.transaction_begin(_("Add Child to Family")
) as trans:
with DbTxn(_("Add Child to Family"), self.dbstate.db) as trans:
#add parentref to child
person.add_parent_family_handle(family_handle)
#default relationship is used