Deletion of people

Jul 23, 2007 at 9:09 AM
How do you delete a person once you have entered them?
Developer
Jul 23, 2007 at 8:52 PM
Hi Clyde:

To delete a person, look for the 'Delete' button in the upper, right-hand corner of the main window. It's red. The delete button only appears when it's possible to delete a person. Otherwise it does not. In Family.Show we only allow the user to delete a person when that person does not have any children.

Thanks,


Paul Osburn
Aug 3, 2007 at 1:06 PM
OK, thanks, I see what you mean now.

Awesome application by the way. Well done!
Apr 10, 2009 at 1:47 PM
Edited Apr 10, 2009 at 1:47 PM
Has the ability to delete people been removed in Family.Show 3.5 I cannot seem to find it.
Developer
Apr 11, 2009 at 9:32 PM
Edited Apr 11, 2009 at 9:34 PM
The current version is 3.0.

Delete has not gone.  It appears in the top right hand corner of the right hand column next to the current persons name.   However, not all people can be deleted.  Generally they have to have less than 3 relationships.  I think this is to stop you ending up with 2 separate unconnected trees in one file.  This is the code the program uses to decide if people are deletable:

 // With a few exceptions, anyone with less than 3 relationships is deletable
                if (relationships.Count < 3)
                {
                    // The person has 2 spouses. Since they connect their spouses, they are not deletable.
                    if (Spouses.Count == 2)
                        return false;

                    // The person is connecting two generations
                    if (Parents.Count == 1 && Children.Count == 1)
                        return false;

                    // The person is connecting inlaws
                    if (Parents.Count == 1 && Spouses.Count == 1)
                        return false;

                    // Anyone else with less than 3 relationships is deletable
                    return true;
                }

                // More than 3 relationships, however the relationships are from only Children.
                if (Children.Count > 0 && Parents.Count == 0 && Siblings.Count == 0 && Spouses.Count == 0)
                    return true;

                // More than 3 relationships. The relationships are from siblings. Deletable since siblings are connected to each other or the parent.
                if (Siblings.Count > 0 && Parents.Count >= 0 && Spouses.Count == 0 && Children.Count == 0)
                    return true;

                // This person has complicated dependencies that does not allow deletion.
                return false;
            }