[core] fix minimize for all modules (nic, traffic, etc.)
make it possible to toggle the display state of a widget between "displayed" and "minimized" also for modules that re-create their widgets during each iteration. see #661
This commit is contained in:
parent
34dadadf90
commit
441e7d5041
4 changed files with 26 additions and 18 deletions
|
@ -171,7 +171,8 @@ class Module(core.input.Object):
|
|||
"""
|
||||
|
||||
def add_widget(self, full_text="", name=None):
|
||||
widget = core.widget.Widget(full_text=full_text, name=name)
|
||||
widget_id = "{}::{}".format(self.name, len(self.widgets()))
|
||||
widget = core.widget.Widget(full_text=full_text, name=name, widget_id=widget_id)
|
||||
self.widgets().append(widget)
|
||||
widget.module = self
|
||||
return widget
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue