Qt/TAS: Fix issue #11620
This commit is contained in:
parent
8bad3f93f1
commit
04583b17da
|
@ -61,10 +61,12 @@ void IRWidget::paintEvent(QPaintEvent* event)
|
||||||
void IRWidget::mousePressEvent(QMouseEvent* event)
|
void IRWidget::mousePressEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
handleMouseEvent(event);
|
handleMouseEvent(event);
|
||||||
|
m_ignore_movement = event->button() == Qt::RightButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRWidget::mouseMoveEvent(QMouseEvent* event)
|
void IRWidget::mouseMoveEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
|
if (!m_ignore_movement)
|
||||||
handleMouseEvent(event);
|
handleMouseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ protected:
|
||||||
private:
|
private:
|
||||||
u16 m_x = 0;
|
u16 m_x = 0;
|
||||||
u16 m_y = 0;
|
u16 m_y = 0;
|
||||||
|
bool m_ignore_movement = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Should be part of class but fails to compile on mac os
|
// Should be part of class but fails to compile on mac os
|
||||||
|
|
|
@ -62,10 +62,12 @@ void StickWidget::paintEvent(QPaintEvent* event)
|
||||||
void StickWidget::mousePressEvent(QMouseEvent* event)
|
void StickWidget::mousePressEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
handleMouseEvent(event);
|
handleMouseEvent(event);
|
||||||
|
m_ignore_movement = event->button() == Qt::RightButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
void StickWidget::mouseMoveEvent(QMouseEvent* event)
|
void StickWidget::mouseMoveEvent(QMouseEvent* event)
|
||||||
{
|
{
|
||||||
|
if (!m_ignore_movement)
|
||||||
handleMouseEvent(event);
|
handleMouseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,4 +33,5 @@ private:
|
||||||
u16 m_max_y;
|
u16 m_max_y;
|
||||||
u16 m_x = 0;
|
u16 m_x = 0;
|
||||||
u16 m_y = 0;
|
u16 m_y = 0;
|
||||||
|
bool m_ignore_movement = false;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue