* src/gramps_main.py (change_active_person): Dont change to the current active person again.
* src/FamilyView.py (drag_data_received): Allow reordering of childs when they were not correctly ordered before. svn: r4725
This commit is contained in:
parent
811014e1c2
commit
d120265624
@ -1,3 +1,9 @@
|
|||||||
|
2005-05-28 Martin Hawlisch <Martin.Hawlisch@gmx.de>
|
||||||
|
* src/gramps_main.py (change_active_person): Dont change to the
|
||||||
|
current active person again.
|
||||||
|
* src/FamilyView.py (drag_data_received): Allow reordering of childs
|
||||||
|
when they were not correctly ordered before.
|
||||||
|
|
||||||
2005-05-23 Jens Arvidsson <jya@sverige.nu>
|
2005-05-23 Jens Arvidsson <jya@sverige.nu>
|
||||||
* src/po/sv.po: A few fixes to the Swedish translation.
|
* src/po/sv.po: A few fixes to the Swedish translation.
|
||||||
|
|
||||||
|
@ -790,6 +790,7 @@ class FamilyView:
|
|||||||
self.parent.db.commit_family(family,trans)
|
self.parent.db.commit_family(family,trans)
|
||||||
self.parent.db.commit_person(person,trans)
|
self.parent.db.commit_person(person,trans)
|
||||||
|
|
||||||
|
# TODO: Add child ordered by birth day
|
||||||
family.add_child_handle(new_person.get_handle())
|
family.add_child_handle(new_person.get_handle())
|
||||||
new_person.add_parent_family_handle(family.get_handle(),
|
new_person.add_parent_family_handle(family.get_handle(),
|
||||||
RelLib.Person.CHILD_REL_BIRTH,
|
RelLib.Person.CHILD_REL_BIRTH,
|
||||||
@ -1467,11 +1468,15 @@ class FamilyView:
|
|||||||
src = spath[0]
|
src = spath[0]
|
||||||
child_list = self.family.get_child_handle_list()
|
child_list = self.family.get_child_handle_list()
|
||||||
|
|
||||||
|
# Check if the children were in order before the attempt to reorder
|
||||||
|
was_ordered = self.birth_dates_in_order(child_list)
|
||||||
|
|
||||||
obj = child_list[src]
|
obj = child_list[src]
|
||||||
child_list.remove(obj)
|
child_list.remove(obj)
|
||||||
child_list.insert(row,obj)
|
child_list.insert(row,obj)
|
||||||
|
|
||||||
if self.birth_dates_in_order(child_list) == 0:
|
# abort if a valid order was attempt to destroy
|
||||||
|
if was_ordered and self.birth_dates_in_order(child_list) == False:
|
||||||
WarningDialog(_("Attempt to Reorder Children Failed"),
|
WarningDialog(_("Attempt to Reorder Children Failed"),
|
||||||
_("Children must be ordered by their birth dates."))
|
_("Children must be ordered by their birth dates."))
|
||||||
return
|
return
|
||||||
|
@ -308,6 +308,7 @@ class SelectChild:
|
|||||||
self.top)
|
self.top)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# TODO: Add child ordered by birth day
|
||||||
self.family.add_child_handle(select_child.get_handle())
|
self.family.add_child_handle(select_child.get_handle())
|
||||||
|
|
||||||
mrel = self.mrel.get_active()
|
mrel = self.mrel.get_active()
|
||||||
|
@ -1527,6 +1527,15 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
|
|||||||
self.people_view.goto_active_person()
|
self.people_view.goto_active_person()
|
||||||
|
|
||||||
def change_active_person(self,person,force=0):
|
def change_active_person(self,person,force=0):
|
||||||
|
nph = ""
|
||||||
|
if person:
|
||||||
|
nph = person.get_handle()
|
||||||
|
oph = ""
|
||||||
|
if self.active_person:
|
||||||
|
oph = self.active_person.get_handle()
|
||||||
|
if nph == oph: # no need to change to the current active person again
|
||||||
|
return
|
||||||
|
|
||||||
if person == None:
|
if person == None:
|
||||||
self.set_buttons(0)
|
self.set_buttons(0)
|
||||||
self.active_person = None
|
self.active_person = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user