changeset 867:4b3d7e8ba24a

subcomposer is nicer if we always have some Submaster object. and if you call all the init code Ignore-this: 372122231f997f3301e23d69e96360fa
author Drew Perttula <drewp@bigasterisk.com>
date Thu, 06 Jun 2013 04:43:21 +0000
parents 43ddee394d28
children 224d6cd7e1e4
files bin/subcomposer
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/bin/subcomposer	Thu Jun 06 04:42:51 2013 +0000
+++ b/bin/subcomposer	Thu Jun 06 04:43:21 2013 +0000
@@ -67,17 +67,20 @@
         self.graph = graph
         self.session = session
 
-        # this is a PersistentSubmaster (even for local) or None if we're not initialized
-        self.currentSub = Observable(None)
+        # this is a URIRef or Local
+        self._currentChoice = Observable(Local)
 
-        self._currentChoice = Observable(Local)
+        # this is a PersistentSubmaster (even for local)
+        self.currentSub = Observable(Submaster.PersistentSubmaster(
+                    graph, self.makeLocal()))
 
         def pc(val):
             log.info("change viewed sub to %s", val)
         self._currentChoice.subscribe(pc)
 
         EditChoice(self, self.graph, self._currentChoice).frame.pack(side='top')
-
+        self.setupSubChoiceLinks()
+        
     def setupSubChoiceLinks(self):
 
         def ann():