changeset 3116:328a6cea3802

quick frontend (widgets): don't use *args for onDelete + more debug logs
author Goffi <goffi@goffi.org>
date Fri, 17 Jan 2020 20:27:35 +0100
parents 3018d153a615
children 385fdd684f87
files sat_frontends/quick_frontend/quick_widgets.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sat_frontends/quick_frontend/quick_widgets.py	Fri Jan 17 18:47:02 2020 +0100
+++ b/sat_frontends/quick_frontend/quick_widgets.py	Fri Jan 17 20:27:35 2020 +0100
@@ -286,10 +286,13 @@
 
         if all_instances:
             for w in self.getWidgetInstances(widget_to_delete):
-                if w.onDelete(*args, **kwargs) == False:
+                if w.onDelete(**kwargs) == False:
+                    log.debug(
+                        f"Deletion of {widget_to_delete} cancelled by widget itself")
                     return
         else:
-            if widget_to_delete.onDelete(*args, **kwargs) == False:
+            if widget_to_delete.onDelete(**kwargs) == False:
+                log.debug(f"Deletion of {widget_to_delete} cancelled by widget itself")
                 return
 
         if self.host.selected_widget == widget_to_delete: