* src/ScratchPad.py: check for null model

svn: r6891
This commit is contained in:
Don Allingham 2006-06-15 04:29:47 +00:00
parent 26f17e296e
commit fc74ec2662
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,5 @@
2006-06-14 Don Allingham <don@gramps-project.org> 2006-06-14 Don Allingham <don@gramps-project.org>
* src/ScratchPad.py: check for null model
* src/GrampsDb/_ReadGedcom.py: fix INT date format * src/GrampsDb/_ReadGedcom.py: fix INT date format
2006-06-14 Alex Roitman <shura@gramps-project.org> 2006-06-14 Alex Roitman <shura@gramps-project.org>

View File

@ -743,9 +743,10 @@ class ScratchPadListView:
def remove_invalid_objects(self,dummy=None): def remove_invalid_objects(self,dummy=None):
model = self._widget.get_model() model = self._widget.get_model()
for o in model: if model:
if not o.is_valid(): for o in model:
model.remove(o) if not o.is_valid():
model.remove(o)
# Method to manage the wrapper classes. # Method to manage the wrapper classes.