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:
Richard Stanway 2022-09-13 00:36:54 +02:00 committed by Jim
parent 2c8a55f82b
commit 21c711d46b

View File

@ -274,12 +274,14 @@ void OBSProjector::mousePressEvent(QMouseEvent *event)
popup.addAction(QTStr("Close"), this, SLOT(EscapeTriggered()));
popup.exec(QCursor::pos());
}
} else if (event->button() == Qt::LeftButton) {
// Only MultiView projectors handle left click
if (this->type != ProjectorType::Multiview)
return;
if (!mouseSwitching)
return;
if (!mouseSwitching)
return;
if (event->button() == Qt::LeftButton) {
QPoint pos = event->pos();
OBSSource src =
multiview->GetSourceByPosition(pos.x(), pos.y());