Hide monitors that are not visible

This commit is contained in:
Roberto Alsina 2020-02-03 16:39:24 -03:00
parent 1efbd9586d
commit f5aaec79e0
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,11 @@ class MonitorItem(QGraphicsRectItem, QObject):
self.setBrush(QBrush("#f1f1f1", Qt.SolidPattern))
self.setZValue(-1000)
if not data["current_mode"]: # Disconnected or disabled
self.hide()
else:
self.show()
def mousePressEvent(self, event):
self.window.pos_label.show()
self.setCursor(Qt.ClosedHandCursor)