mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#396) Scroll wheel now pans the plot in the depth direction
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user