UI: Ignore left-click on non-multiview projectors
Fixes a crash that could occur after having both multiview and non-multiview projectors active.
This commit is contained in:
parent
2c8a55f82b
commit
21c711d46b
@ -274,12 +274,14 @@ void OBSProjector::mousePressEvent(QMouseEvent *event)
|
|||||||
|
|
||||||
popup.addAction(QTStr("Close"), this, SLOT(EscapeTriggered()));
|
popup.addAction(QTStr("Close"), this, SLOT(EscapeTriggered()));
|
||||||
popup.exec(QCursor::pos());
|
popup.exec(QCursor::pos());
|
||||||
}
|
} else if (event->button() == Qt::LeftButton) {
|
||||||
|
// Only MultiView projectors handle left click
|
||||||
|
if (this->type != ProjectorType::Multiview)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!mouseSwitching)
|
if (!mouseSwitching)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event->button() == Qt::LeftButton) {
|
|
||||||
QPoint pos = event->pos();
|
QPoint pos = event->pos();
|
||||||
OBSSource src =
|
OBSSource src =
|
||||||
multiview->GetSourceByPosition(pos.x(), pos.y());
|
multiview->GetSourceByPosition(pos.x(), pos.y());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user