react to clicking on monitor by selecting it

This commit is contained in:
Roberto Alsina 2020-01-31 17:11:49 -03:00
parent 1e5e3fe81a
commit 393c0c09b3

View File

@ -37,6 +37,7 @@ class MonitorItem(QGraphicsRectItem, QObject):
def mousePressEvent(self, event): def mousePressEvent(self, event):
self.setCursor(Qt.ClosedHandCursor) self.setCursor(Qt.ClosedHandCursor)
self.orig_pos = self.pos() self.orig_pos = self.pos()
self.window.ui.screenCombo.setCurrentText(self.name)
def mouseReleaseEvent(self, event): def mouseReleaseEvent(self, event):
self.setCursor(Qt.OpenHandCursor) self.setCursor(Qt.OpenHandCursor)