Commit 0709d9c3 authored by Dan Pascu's avatar Dan Pascu

Simplified code

parent 1d6fae7c
......@@ -75,10 +75,8 @@ class StreamButton(QToolButton):
def setVisible(self, visible):
super(StreamButton, self).setVisible(visible)
if visible:
self.shown.emit()
else:
self.hidden.emit()
signal = self.shown if visible else self.hidden
signal.emit()
def setIcon(self, icon):
self.default_icon = icon
......@@ -195,10 +193,8 @@ class SegmentButton(QToolButton):
def setVisible(self, visible):
super(SegmentButton, self).setVisible(visible)
if visible:
self.shown.emit()
else:
self.hidden.emit()
signal = self.shown if visible else self.hidden
signal.emit()
class SwitchViewButton(QPushButton):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment