[kupfer] grouping: Unregister grouped member in finalize



commit b62bb3aac41ca57faebc3ed837d190ff5c995ce1
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Mar 3 22:59:27 2011 +0100

    grouping: Unregister grouped member in finalize

 kupfer/obj/grouping.py |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/kupfer/obj/grouping.py b/kupfer/obj/grouping.py
index c25787f..fc21e10 100644
--- a/kupfer/obj/grouping.py
+++ b/kupfer/obj/grouping.py
@@ -168,6 +168,10 @@ class ToplevelGroupingSource (GroupingSource):
 		self._sources[self.category][self] = 1
 		self.output_debug("Register %s source %s" % (self.category, self))
 
+	def finalize(self):
+		del self._sources[self.category][self]
+		self.output_debug("Unregister %s source %s" % (self.category, self))
+
 class _GroupedItemsSource(Source):
 	def __init__(self, leaf):
 		Source.__init__(self, unicode(leaf))



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]