From fa83513ac60e67392f734e6c4f39fcc6a108aa39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Wed, 2 Dec 2015 12:22:19 +0100 Subject: [PATCH] Made scrollbar inactive on zoom all. Made zoom all depth show the endpoint of the plot. --- ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp | 2 +- ApplicationCode/UserInterface/RiuWellLogPlot.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp index b2627f34b4..6ca6fd7bc7 100644 --- a/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp +++ b/ApplicationCode/ProjectDataModel/RimWellLogPlot.cpp @@ -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 { diff --git a/ApplicationCode/UserInterface/RiuWellLogPlot.cpp b/ApplicationCode/UserInterface/RiuWellLogPlot.cpp index 2ffc6f003d..55d939628b 100644 --- a/ApplicationCode/UserInterface/RiuWellLogPlot.cpp +++ b/ApplicationCode/UserInterface/RiuWellLogPlot.cpp @@ -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);