Surname Editor; fix so changes made update Person 'Preferred Name'
Fixes #10254
This commit is contained in:
parent
3980fca903
commit
cd32559282
@ -204,6 +204,16 @@ class SurnameTab(EmbeddedList):
|
|||||||
if self.on_change:
|
if self.on_change:
|
||||||
self.on_change()
|
self.on_change()
|
||||||
|
|
||||||
|
def post_rebuild(self, prebuildpath):
|
||||||
|
"""
|
||||||
|
Called when data model has changed, in particular necessary when row
|
||||||
|
order is updated.
|
||||||
|
@param prebuildpath: path selected before rebuild, None if none
|
||||||
|
@type prebuildpath: tree path
|
||||||
|
"""
|
||||||
|
if self.on_change:
|
||||||
|
self.on_change()
|
||||||
|
|
||||||
def column_order(self):
|
def column_order(self):
|
||||||
# order of columns for EmbeddedList. Only the text columns here
|
# order of columns for EmbeddedList. Only the text columns here
|
||||||
return ((1, 0), (1, 1), (1, 2))
|
return ((1, 0), (1, 1), (1, 2))
|
||||||
|
@ -197,9 +197,6 @@ class EditPerson(EditPrimary):
|
|||||||
self.singsurnfr = SingSurn(self.top)
|
self.singsurnfr = SingSurn(self.top)
|
||||||
self.multsurnfr = self.top.get_object("hboxmultsurnames")
|
self.multsurnfr = self.top.get_object("hboxmultsurnames")
|
||||||
self.singlesurn_active = True
|
self.singlesurn_active = True
|
||||||
self.surntab = SurnameTab(self.dbstate, self.uistate, self.track,
|
|
||||||
self.obj.get_primary_name(),
|
|
||||||
on_change=self._changed_name)
|
|
||||||
|
|
||||||
self.set_contexteventbox(self.top.get_object("eventboxtop"))
|
self.set_contexteventbox(self.top.get_object("eventboxtop"))
|
||||||
|
|
||||||
@ -445,6 +442,9 @@ class EditPerson(EditPrimary):
|
|||||||
|
|
||||||
self.preview_name = self.top.get_object("full_name")
|
self.preview_name = self.top.get_object("full_name")
|
||||||
self.preview_name.override_font(Pango.FontDescription('sans bold 12'))
|
self.preview_name.override_font(Pango.FontDescription('sans bold 12'))
|
||||||
|
self.surntab = SurnameTab(self.dbstate, self.uistate, self.track,
|
||||||
|
self.obj.get_primary_name(),
|
||||||
|
on_change=self._changed_name)
|
||||||
|
|
||||||
def get_start_date(self):
|
def get_start_date(self):
|
||||||
"""
|
"""
|
||||||
@ -936,7 +936,8 @@ class EditPerson(EditPrimary):
|
|||||||
msurhbox = self.top.get_object("hboxmultsurnames")
|
msurhbox = self.top.get_object("hboxmultsurnames")
|
||||||
msurhbox.remove(self.surntab)
|
msurhbox.remove(self.surntab)
|
||||||
self.surntab = SurnameTab(self.dbstate, self.uistate, self.track,
|
self.surntab = SurnameTab(self.dbstate, self.uistate, self.track,
|
||||||
self.obj.get_primary_name())
|
self.obj.get_primary_name(),
|
||||||
|
on_change=self._changed_name)
|
||||||
self.multsurnfr.set_size_request(-1,
|
self.multsurnfr.set_size_request(-1,
|
||||||
int(config.get('interface.surname-box-height')))
|
int(config.get('interface.surname-box-height')))
|
||||||
msurhbox.pack_start(self.surntab, True, True, 0)
|
msurhbox.pack_start(self.surntab, True, True, 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user