(#617) Improved wheel zoom on curves

The scroll bar was updated as part of the wheel zoom event, and a signal
from this update caused a panning of the curve
This commit is contained in:
Magne Sjaastad 2015-12-02 08:29:28 +01:00
parent dac0db0fb9
commit 8047b9e92e

View File

@ -199,11 +199,15 @@ void RiuWellLogPlot::updateScrollBar(double minDepth, double maxDepth)
double visibleDepth = maxDepth - minDepth;
m_scrollBar->setRange((int) availableMinDepth, (int) (ceil(availableMaxDepth - visibleDepth)));
m_scrollBar->setPageStep((int) visibleDepth);
m_scrollBar->setValue((int) minDepth);
m_scrollBar->blockSignals(true);
{
m_scrollBar->setRange((int) availableMinDepth, (int) (ceil(availableMaxDepth - visibleDepth)));
m_scrollBar->setPageStep((int) visibleDepth);
m_scrollBar->setValue((int) minDepth);
m_scrollBar->setVisible(true);
m_scrollBar->setVisible(true);
}
m_scrollBar->blockSignals(false);
}
//--------------------------------------------------------------------------------------------------