* Annotations are no longer cluttered as if they all belong to the same

dimension. There was a bug that actually gave the same annotation dictionary
   to all dictionary annotation handlers.
 * The selection window now remembers which annotation was shown for each
   dimension.
This commit is contained in:
Einar Ryeng 2007-12-11 13:47:29 +00:00
parent c862c8bb04
commit cef882b0a4
2 changed files with 4 additions and 2 deletions

View File

@ -39,7 +39,9 @@ class AnnotationHandler:
class DictAnnotationHandler(AnnotationHandler):
def __init__(self, d={}):
def __init__(self, d=None):
if d == None:
d = {}
self._dict = d
def get_annotations(self, annotationname, ids, default=None):

View File

@ -73,11 +73,11 @@ class IdListController:
if dimname == self._dimension:
return
self._dimension = dimname
self.set_annotation(self._annotation.get(dimname, None))
if not self._annotation.has_key(dimname):
self._annotation[dimname] = None
self._dimension = dimname
def set_annotation(self, annotation):
"""Set the displayed annotation to annotation. If annotation is None,