diff cagou/core/widgets_handler.py @ 248:b6e33b35538b

core, widgets handler: visible_widgets now keep all CagouWidgets, not only QuickWidgets. visible_quick_widgets can be used if only QuickWidgets are desired.
author Goffi <goffi@goffi.org>
date Sat, 26 Jan 2019 20:24:48 +0100
parents 9835cafbd909
children 145c29b5f2b5
line wrap: on
line diff
--- a/cagou/core/widgets_handler.py	Sat Jan 26 20:24:48 2019 +0100
+++ b/cagou/core/widgets_handler.py	Sat Jan 26 20:24:48 2019 +0100
@@ -323,11 +323,11 @@
         self.updateHiddenSlides()
 
     def onSlideChange(self, handler, new_slide):
-        if isinstance(self._former_slide, quick_widgets.QuickWidget):
-            G.host.removeVisibleWidget(self._former_slide)
+        if self._former_slide is not None:
+            G.host._removeVisibleWidget(self._former_slide)
         self._former_slide = new_slide
-        if isinstance(new_slide, quick_widgets.QuickWidget):
-            G.host.addVisibleWidget(new_slide)
+        if new_slide is not None:
+            G.host._addVisibleWidget(new_slide)
             self.updateHiddenSlides()
 
     def hiddenList(self, visible_list):