From f311e3d64acf71e45ef1ccb39893b11bafc95dea Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 11 Jul 2012 03:19:56 +0000 Subject: [PATCH] Fixes for tags svn: r19984 --- src/gen/db/dictionary.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gen/db/dictionary.py b/src/gen/db/dictionary.py index 9cb9051fb..f7e5e6150 100644 --- a/src/gen/db/dictionary.py +++ b/src/gen/db/dictionary.py @@ -232,6 +232,7 @@ class DictionaryDb(DbWriteBase, DbReadBase): self.note_map = {} self.media_map = {} self.event_map = {} + self.tag_map = {} self.metadata = {} self.name_group = {} self.undo_callback = None @@ -558,7 +559,10 @@ class DictionaryDb(DbWriteBase, DbReadBase): return self.note_map.keys() def get_tag_handles(self, sort_handles=False): - return [] + if sort_handles: + return sorted(self.tag_map.keys()) + else: + return self.tag_map.keys() def get_event_from_handle(self, handle): return self.event_map[handle] @@ -842,7 +846,7 @@ class DictionaryDb(DbWriteBase, DbReadBase): def add_tag(self, tag, trans): if not tag.handle: tag.handle = create_id() - self.commit_event(tag, trans) + self.commit_tag(tag, trans) return tag.handle def add_object(self, obj, transaction, set_gid=True):