mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#695) Unintentional picking fixed.
Fixed in viewer, keeping the concept of the navigation policies to not flag the the events as handled. Made this clearer by adding an interface to turn event consumption on or off on the navigation policies.
This commit is contained in:
@@ -228,6 +228,13 @@ void RiuViewer::mouseReleaseEvent(QMouseEvent* event)
|
||||
|
||||
if (event->button() == Qt::LeftButton)
|
||||
{
|
||||
QPoint diffPoint = event->pos() - m_lastMousePressPosition;
|
||||
if (diffPoint.manhattanLength() > 3)
|
||||
{
|
||||
// We are possibly in navigation mode, only clean press event will launch
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_infoLabelOverlayArea.isNull())
|
||||
{
|
||||
if (m_infoLabelOverlayArea.contains(event->x(), event->y()))
|
||||
@@ -239,7 +246,9 @@ void RiuViewer::mouseReleaseEvent(QMouseEvent* event)
|
||||
}
|
||||
|
||||
m_viewerCommands->handlePickAction(event->x(), event->y(), event->modifiers());
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
else if (event->button() == Qt::RightButton)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user