(#396) Scroll wheel now pans the plot in the depth direction

This commit is contained in:
Pål Hagen
2015-09-02 16:30:37 +02:00
parent fd3df6492b
commit 8d7bbb85a9
3 changed files with 16 additions and 1 deletions

View File

@@ -32,7 +32,8 @@
#include <math.h>
#define RIU_SCROLLWHEEL_ZOOMFACTOR 1.05
#define RIU_SCROLLWHEEL_ZOOMFACTOR 1.05
#define RIU_SCROLLWHEEL_PANFACTOR 0.05
//--------------------------------------------------------------------------------------------------
///
@@ -132,6 +133,10 @@ void RiuWellLogPlot::wheelEvent(QWheelEvent* event)
m_plotDefinition->zoomDepth(1.0/RIU_SCROLLWHEEL_ZOOMFACTOR);
}
}
else
{
m_plotDefinition->panDepth(event->delta() < 0 ? RIU_SCROLLWHEEL_PANFACTOR : -RIU_SCROLLWHEEL_PANFACTOR);
}
event->accept();
}