quick frontend (widgets): fixed widget creation in getOrCreateWidget:

when a new widget was created, it was overwritting the exiting instances list. This patch
fixes it.
This commit is contained in:
Goffi 2020-01-17 17:55:57 +01:00
commit 6bff1bdc33

View file

@ -225,7 +225,7 @@ class QuickWidgetsManager(object):
# we need to create a new widget
log.debug("Creating new widget for target {} {}".format(target, cls))
widget = cls(*_args, **_kwargs)
widgets_map[hash_] = [widget]
widgets_map.setdefault(hash_, []).append(widget)
if on_new_widget == C.WIDGET_NEW:
self.host.newWidget(widget)