#836 Fixed missing/wrong zoom update for well log plots when opening project.

Refactored the zoom update method names
This commit is contained in:
Jacob Støren
2016-09-13 09:59:34 +02:00
parent 2ea167337f
commit 9041e4a582
14 changed files with 41 additions and 23 deletions

View File

@@ -114,7 +114,7 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
{
if (m_isAutoScaleXEnabled())
{
this->zoomAllXAxisIfAutoScale();
this->updateXZoom();
computeAndSetXRangeMinForLogarithmicScale();
if (m_wellLogTrackPlotWidget) m_wellLogTrackPlotWidget->replot();
@@ -124,7 +124,7 @@ void RimWellLogTrack::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
{
updateAxisScaleEngine();
this->zoomAllXAxisIfAutoScale();
this->updateXZoom();
computeAndSetXRangeMinForLogarithmicScale();
m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax);
@@ -282,7 +282,7 @@ void RimWellLogTrack::detachAllCurves()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::zoomAllXAndZoomAllDepthOnOwnerPlot()
void RimWellLogTrack::updateXZoomAndParentPlotDepthZoom()
{
if (m_wellLogTrackPlotWidget)
{
@@ -293,7 +293,7 @@ void RimWellLogTrack::zoomAllXAndZoomAllDepthOnOwnerPlot()
wellLogPlot->updateDepthZoom();
}
zoomAllXAxisIfAutoScale();
updateXZoom();
m_wellLogTrackPlotWidget->replot();
}
@@ -302,9 +302,14 @@ void RimWellLogTrack::zoomAllXAndZoomAllDepthOnOwnerPlot()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogTrack::zoomAllXAxisIfAutoScale()
void RimWellLogTrack::updateXZoom()
{
if (!m_isAutoScaleXEnabled()) return;
if (!m_isAutoScaleXEnabled())
{
m_wellLogTrackPlotWidget->setXRange(m_visibleXRangeMin, m_visibleXRangeMax);
m_wellLogTrackPlotWidget->replot();
return;
}
double minValue = HUGE_VAL;
double maxValue = -HUGE_VAL;