From 1f7bdb098b8468f706536758f2c375901ce7d13d Mon Sep 17 00:00:00 2001 From: Mika Fischer Date: Tue, 14 Jun 2011 16:40:27 +0200 Subject: [PATCH] Fix problem with constructor ordering --- sloth/annotations/model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sloth/annotations/model.py b/sloth/annotations/model.py index e9e8077..de126b9 100644 --- a/sloth/annotations/model.py +++ b/sloth/annotations/model.py @@ -195,10 +195,11 @@ class ImageModelItem(ModelItem): class ImageFileModelItem(FileModelItem, ImageModelItem): def __init__(self, fileinfo): + annotations = fileinfo.get("annotations", []) if fileinfo.has_key("annotations"): - ImageModelItem.__init__(self, fileinfo["annotations"]) del fileinfo["annotations"] FileModelItem.__init__(self, fileinfo) + ImageModelItem.__init__(self, annotations) def data(self, role=Qt.DisplayRole, column=0): if role == DataRole: