diff src/cagou/core/cagou_main.py @ 34:02acbb297a61

handler, widget: deleteWidget is now properly called when a QuickWidget is deleted
author Goffi <goffi@goffi.org>
date Mon, 22 Aug 2016 20:58:12 +0200
parents c21d1be2e54c
children 9f45098289cc
line wrap: on
line diff
--- a/src/cagou/core/cagou_main.py	Sun Aug 21 21:41:52 2016 +0200
+++ b/src/cagou/core/cagou_main.py	Mon Aug 22 20:58:12 2016 +0200
@@ -25,6 +25,7 @@
 from sat.core import log as logging
 log = logging.getLogger(__name__)
 from sat_frontends.quick_frontend.quick_app import QuickApp
+from sat_frontends.quick_frontend import quick_widgets
 from sat_frontends.bridge.DBus import DBusBridgeFrontend
 import kivy
 kivy.require('1.9.1')
@@ -326,6 +327,8 @@
             parent = to_change.parent
             idx = parent.children.index(to_change)
             parent.remove_widget(to_change)
+            if isinstance(to_change, quick_widgets.QuickWidget):
+                self.widgets.deleteWidget(to_change)
             parent.add_widget(new, index=idx)
 
     ## misc ##