Dusty Phillips committed 32bf9e9

Queue a show_kv call after setup to clear the kivy viewer. It was previously being loaded with data from 'collapse' being set on AccordionItems during initialization

Comments (0)

Files changed (1)

     def __init__(self, **kwargs):
         super(Catalog, self).__init__(**kwargs)
         self.kv_container = None
+        from kivy.clock import Clock
+        Clock.schedule_once(self.show_kv)
-    def show_kv(self, object, collapsed):
+    def show_kv(self, object, collapsed=None):
         '''Called when an accordionitem is collapsed or expanded. If it
         was expanded, we need to show the .kv language file associated with
         the newly revealed container.'''
         if collapsed == "down":  # a tabbed panel was clicked, not an accordion
             object = object.content.children[0]
             collapsed = False
-        if not collapsed and hasattr(object, "kv_container"):
-            print "called"
+        if collapsed is False and hasattr(object, "kv_container"):
             with open(object.kv_container.kv_file) as file:
                 self.language_box.text =
                 self.kv_container = object.kv_container