[core/widget] remove module from widget initializer

This commit is contained in:
tobi-wan-kenobi 2020-05-18 12:59:47 +02:00
parent fbbd95b7a8
commit e359c75603
3 changed files with 5 additions and 3 deletions

View file

@ -154,8 +154,9 @@ class Module(core.input.Object):
"""
def add_widget(self, full_text="", name=None):
widget = core.widget.Widget(full_text=full_text, name=name, module=self)
widget = core.widget.Widget(full_text=full_text, name=name)
self.widgets().append(widget)
widget.module = self
return widget
"""Convenience method to retrieve a named widget