Qt/TAS: Fix issue #11620

This commit is contained in:
spycrab 2019-03-26 00:38:25 +01:00
parent 8bad3f93f1
commit 04583b17da
4 changed files with 8 additions and 2 deletions

View File

@ -61,10 +61,12 @@ void IRWidget::paintEvent(QPaintEvent* event)
void IRWidget::mousePressEvent(QMouseEvent* event)
{
handleMouseEvent(event);
m_ignore_movement = event->button() == Qt::RightButton;
}
void IRWidget::mouseMoveEvent(QMouseEvent* event)
{
if (!m_ignore_movement)
handleMouseEvent(event);
}

View File

@ -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

View File

@ -62,10 +62,12 @@ void StickWidget::paintEvent(QPaintEvent* event)
void StickWidget::mousePressEvent(QMouseEvent* event)
{
handleMouseEvent(event);
m_ignore_movement = event->button() == Qt::RightButton;
}
void StickWidget::mouseMoveEvent(QMouseEvent* event)
{
if (!m_ignore_movement)
handleMouseEvent(event);
}

View File

@ -33,4 +33,5 @@ private:
u16 m_max_y;
u16 m_x = 0;
u16 m_y = 0;
bool m_ignore_movement = false;
};