(#396) Made sure that Ctrl is needed for scroll wheel zoom

This commit is contained in:
Pål Hagen
2015-09-02 15:58:54 +02:00
parent 3844c0958d
commit fd3df6492b

View File

@@ -121,13 +121,16 @@ void RiuWellLogPlot::wheelEvent(QWheelEvent* event)
return;
}
if (event->delta() > 0)
if (event->modifiers() & Qt::ControlModifier)
{
m_plotDefinition->zoomDepth(RIU_SCROLLWHEEL_ZOOMFACTOR);
}
else
{
m_plotDefinition->zoomDepth(1.0/RIU_SCROLLWHEEL_ZOOMFACTOR);
if (event->delta() > 0)
{
m_plotDefinition->zoomDepth(RIU_SCROLLWHEEL_ZOOMFACTOR);
}
else
{
m_plotDefinition->zoomDepth(1.0/RIU_SCROLLWHEEL_ZOOMFACTOR);
}
}
event->accept();