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

Simplified code

parent 1d6fae7c
...@@ -75,10 +75,8 @@ class StreamButton(QToolButton): ...@@ -75,10 +75,8 @@ class StreamButton(QToolButton):
def setVisible(self, visible): def setVisible(self, visible):
super(StreamButton, self).setVisible(visible) super(StreamButton, self).setVisible(visible)
if visible: signal = self.shown if visible else self.hidden
self.shown.emit() signal.emit()
else:
self.hidden.emit()
def setIcon(self, icon): def setIcon(self, icon):
self.default_icon = icon self.default_icon = icon
...@@ -195,10 +193,8 @@ class SegmentButton(QToolButton): ...@@ -195,10 +193,8 @@ class SegmentButton(QToolButton):
def setVisible(self, visible): def setVisible(self, visible):
super(SegmentButton, self).setVisible(visible) super(SegmentButton, self).setVisible(visible)
if visible: signal = self.shown if visible else self.hidden
self.shown.emit() signal.emit()
else:
self.hidden.emit()
class SwitchViewButton(QPushButton): 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