Fixed for place deletion
svn: r431
This commit is contained in:
parent
7dfc3016a5
commit
17ac560c72
@ -95,8 +95,6 @@ childWindow = None
|
|||||||
new_child_win = None
|
new_child_win = None
|
||||||
add_child_win = None
|
add_child_win = None
|
||||||
bookmarks = None
|
bookmarks = None
|
||||||
pevent = []
|
|
||||||
fevent = []
|
|
||||||
|
|
||||||
id2col = {}
|
id2col = {}
|
||||||
alt2col = {}
|
alt2col = {}
|
||||||
@ -948,9 +946,6 @@ def on_delete_source_clicked(obj):
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def on_delete_place_clicked(obj):
|
def on_delete_place_clicked(obj):
|
||||||
global pevent
|
|
||||||
global fevent
|
|
||||||
|
|
||||||
index = obj.get_data(INDEX)
|
index = obj.get_data(INDEX)
|
||||||
if index == -1:
|
if index == -1:
|
||||||
return
|
return
|
||||||
@ -961,11 +956,11 @@ def on_delete_place_clicked(obj):
|
|||||||
for p in database.getPersonMap().values():
|
for p in database.getPersonMap().values():
|
||||||
for event in [p.getBirth(), p.getDeath()] + p.getEventList():
|
for event in [p.getBirth(), p.getDeath()] + p.getEventList():
|
||||||
if event.getPlace() == place:
|
if event.getPlace() == place:
|
||||||
pevent.append(p,event)
|
pevent.append((p,event))
|
||||||
for f in database.getFamilyMap().values():
|
for f in database.getFamilyMap().values():
|
||||||
for event in f.getEventList():
|
for event in f.getEventList():
|
||||||
if event.getPlace() == place:
|
if event.getPlace() == place:
|
||||||
fevent.append(f,event)
|
fevent.append((f,event))
|
||||||
|
|
||||||
if len(pevent) > 0 or len(fevent) > 0:
|
if len(pevent) > 0 or len(fevent) > 0:
|
||||||
msg = []
|
msg = []
|
||||||
|
Loading…
Reference in New Issue
Block a user