UI: Allow right-clicking to select preview items
Allows selection of items by right-clicking on the preview as well rather than just left-clicks.
This commit is contained in:
parent
3816b0bff9
commit
0e4969535b
@ -341,10 +341,14 @@ void OBSBasicPreview::mousePressEvent(QMouseEvent *event)
|
||||
float x = float(event->x()) - main->previewX / pixelRatio;
|
||||
float y = float(event->y()) - main->previewY / pixelRatio;
|
||||
|
||||
if (event->button() != Qt::LeftButton)
|
||||
OBSQTDisplay::mousePressEvent(event);
|
||||
|
||||
if (event->button() != Qt::LeftButton &&
|
||||
event->button() != Qt::RightButton)
|
||||
return;
|
||||
|
||||
mouseDown = true;
|
||||
if (event->button() == Qt::LeftButton)
|
||||
mouseDown = true;
|
||||
|
||||
vec2_set(&startPos, x, y);
|
||||
GetStretchHandleData(startPos);
|
||||
@ -355,6 +359,9 @@ void OBSBasicPreview::mousePressEvent(QMouseEvent *event)
|
||||
|
||||
mouseOverItems = SelectedAtPos(startPos);
|
||||
vec2_zero(&lastMoveOffset);
|
||||
|
||||
if (event->button() == Qt::RightButton)
|
||||
ProcessClick(startPos);
|
||||
}
|
||||
|
||||
static bool select_one(obs_scene_t *scene, obs_sceneitem_t *item, void *param)
|
||||
|
Loading…
x
Reference in New Issue
Block a user