Ensure only drag on left click

This commit is contained in:
Thomas Wilshaw
2021-10-26 13:16:42 +01:00
parent 0ccd1eca48
commit 631e5d8ac8
+5 -3
View File
@@ -146,9 +146,11 @@ void Marker::mousePressEvent(QMouseEvent* e)
update();
}
click_position_ = e->globalPos();
marker_start_x_ = x();
drag_allowed_ = true;
if (e->button() == Qt::LeftButton) {
click_position_ = e->globalPos();
marker_start_x_ = x();
drag_allowed_ = true;
}
}
void Marker::mouseMoveEvent(QMouseEvent* e)