slider: fixed crash when clicking another mouse button while dragging

This commit is contained in:
itsmattkc
2020-09-18 23:49:40 +10:00
parent 27a4dbc85f
commit 3103359cd6
3 changed files with 18 additions and 7 deletions
+6 -4
View File
@@ -51,10 +51,12 @@ SliderLabel::SliderLabel(QWidget *parent) :
void SliderLabel::mousePressEvent(QMouseEvent *e)
{
if (e->modifiers() & Qt::AltModifier) {
emit RequestReset();
} else {
emit LabelPressed();
if (e->button() == Qt::LeftButton) {
if (e->modifiers() & Qt::AltModifier) {
emit RequestReset();
} else {
emit LabelPressed();
}
}
}