Made scrollbar inactive on zoom all. Made zoom all depth show the endpoint of the plot.

This commit is contained in:
Jacob Støren 2015-12-02 12:22:19 +01:00
parent aebf776408
commit fa83513ac6
2 changed files with 3 additions and 2 deletions

View File

@ -432,7 +432,7 @@ void RimWellLogPlot::zoomAllDepth()
{
if (hasAvailableDepthRange())
{
setDepthZoomMinMax(m_minAvailableDepth, m_maxAvailableDepth);
setDepthZoomMinMax(m_minAvailableDepth, m_maxAvailableDepth + 0.01*(m_maxAvailableDepth - m_minAvailableDepth));
}
else
{

View File

@ -196,12 +196,13 @@ void RiuWellLogPlot::updateScrollBar(double minDepth, double maxDepth)
double availableMinDepth;
double availableMaxDepth;
m_plotDefinition->availableDepthRange(&availableMinDepth, &availableMaxDepth);
availableMaxDepth += 0.01*(availableMaxDepth-availableMinDepth);
double visibleDepth = maxDepth - minDepth;
m_scrollBar->blockSignals(true);
{
m_scrollBar->setRange((int) availableMinDepth, (int) (ceil(availableMaxDepth - visibleDepth)));
m_scrollBar->setRange((int) availableMinDepth, (int) ((availableMaxDepth - visibleDepth)));
m_scrollBar->setPageStep((int) visibleDepth);
m_scrollBar->setValue((int) minDepth);