From d050d61e60518bd241c72228bc2bad60f80f1431 Mon Sep 17 00:00:00 2001 From: Mika Fischer Date: Wed, 29 Jun 2011 14:04:04 +0200 Subject: [PATCH] Fix reporting of numer of annotations in loaded file --- sloth/annotations/model.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sloth/annotations/model.py b/sloth/annotations/model.py index b393514..f031adc 100644 --- a/sloth/annotations/model.py +++ b/sloth/annotations/model.py @@ -177,8 +177,10 @@ class RootModelItem(ModelItem): return len(self.children()) def numAnnotations(self): - # TODO - return 0 + count = 0 + for ann in self._model.iterator(AnnotationModelItem): + count += 1 + return count def getAnnotations(self): return [child.getAnnotations() for child in self.children()]