[modules/rotation] fix widget creation
each iteration of the rotation module created new/duplicate widgets, causing a status bar of infinite length. fixes #782
This commit is contained in:
parent
0410ac9c6b
commit
4a6be622a8
1 changed files with 1 additions and 2 deletions
|
@ -31,14 +31,13 @@ class Module(core.module.Module):
|
|||
orientation = curr_orient
|
||||
break
|
||||
|
||||
widget = self.widget(display)
|
||||
widget = self.widget(name=display)
|
||||
if not widget:
|
||||
widget = self.add_widget(full_text=display, name=display)
|
||||
core.input.register(
|
||||
widget, button=core.input.LEFT_MOUSE, cmd=self.__toggle
|
||||
)
|
||||
widget.set("orientation", orientation)
|
||||
widgets.append(widget)
|
||||
|
||||
def state(self, widget):
|
||||
return widget.get("orientation", "normal")
|
||||
|
|
Loading…
Reference in a new issue