Commit 462b430d authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix right mouse click behavior on monitor when effect scene is displayed.

Fixes #1252
parent 026f2109
......@@ -739,7 +739,7 @@ bool GLWidget::checkFrameNumber(int pos, int offset, bool isPlaying)
void GLWidget::mousePressEvent(QMouseEvent *event)
{
if ((rootObject() != nullptr) && rootObject()->objectName() != QLatin1String("root") && !(event->modifiers() & Qt::ControlModifier) &&
if ((rootObject() != nullptr) && rootObject()->property("captureRightClick").toBool() && !(event->modifiers() & Qt::ControlModifier) &&
!(event->buttons() & Qt::MiddleButton)) {
event->ignore();
QQuickView::mousePressEvent(event);
......
......@@ -23,6 +23,7 @@ Item {
property double zoom
property double scalex
property double scaley
property bool captureRightClick: false
// Zoombar properties
// The start position of the zoomed area, between 0 and 1
property double zoomStart: 0
......
......@@ -21,6 +21,7 @@ Item {
property double zoom
property double scalex
property double scaley
property bool captureRightClick: false
property bool dropped: false
property string fps: '-'
property bool showMarkers: false
......
......@@ -21,6 +21,7 @@ Item {
property point center
property double scalex
property double scaley
property bool captureRightClick: false
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
......
......@@ -22,6 +22,7 @@ Item {
property point center
property double scalex
property double scaley
property bool captureRightClick: false
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
......@@ -196,7 +197,7 @@ Item {
property bool isMoving : false
anchors.centerIn: root
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
acceptedButtons: Qt.LeftButton
cursorShape: containsMouse ? Qt.PointingHandCursor : Qt.ArrowCursor
onWheel: {
controller.seek(wheel.angleDelta.x + wheel.angleDelta.y, wheel.modifiers)
......@@ -280,6 +281,7 @@ Item {
property int oldMouseX
property int oldMouseY
property double handleRatio: 1
acceptedButtons: Qt.LeftButton
width: parent.width; height: parent.height
anchors.centerIn: parent
hoverEnabled: true
......
......@@ -23,6 +23,7 @@ Item {
property color overlayColor: 'cyan'
property double scalex : 1
property double scaley : 1
property bool captureRightClick: true
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
......
......@@ -28,6 +28,7 @@ Item {
property double offsety
property double scalex
property double scaley
property bool captureRightClick: false
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
......
......@@ -22,6 +22,7 @@ Item {
property point center
property double scalex
property double scaley
property bool captureRightClick: false
// Zoombar properties
property double zoomStart: 0
property double zoomFactor: 1
......
......@@ -16,6 +16,7 @@ Item {
property double zoom
property double scalex
property double scaley
property bool captureRightClick: false
property bool dropped: false
property string fps: '-'
property bool showMarkers: false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment