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