2007-06-19 Alex Roitman <shura@gramps-project.org>
* src/FilterEditor/_FilterEditor.py (_do_delete_filter): Use a copy for iteration over the filters. svn: r8597
This commit is contained in:
parent
5ccf7a65df
commit
8278778e65
@ -1,3 +1,7 @@
|
||||
2007-06-19 Alex Roitman <shura@gramps-project.org>
|
||||
* src/FilterEditor/_FilterEditor.py (_do_delete_filter): Use a
|
||||
copy for iteration over the filters.
|
||||
|
||||
2007-06-18 Brian Matherly <brian@gramps-project.org>
|
||||
* src/plugins/DetDescendantReport.py:
|
||||
* src/plugins/DetAncestralReport.py:
|
||||
|
@ -212,7 +212,10 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
and C is 'matches D' the removal of D leads to two broken filter
|
||||
being left behind.
|
||||
"""
|
||||
filters = self.filterdb.get_filters(space)
|
||||
# Use the copy of the filter list to iterate over, so that
|
||||
# the removal of filters does not screw up the iteration
|
||||
filters = self.filterdb.get_filters(space)[:]
|
||||
|
||||
name = gfilter.get_name()
|
||||
for the_filter in filters:
|
||||
for rule in the_filter.get_rules():
|
||||
@ -221,7 +224,8 @@ class FilterEditor(ManagedWindow.ManagedWindow):
|
||||
and (name in values):
|
||||
self._do_delete_filter(space,the_filter)
|
||||
break
|
||||
filters.remove(gfilter)
|
||||
# The actual removal is from the real filter list, not a copy.
|
||||
self.filterdb.get_filters(space).remove(gfilter)
|
||||
|
||||
def get_all_handles(self):
|
||||
if self.space == 'Person':
|
||||
|
Loading…
x
Reference in New Issue
Block a user