mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#396) Set visible depth range from all available data when there's only 1 trace with 1 curve
This commit is contained in:
parent
dfdfdc3efc
commit
94095a16f0
@ -34,6 +34,7 @@
|
||||
#include "RimWellLogPlotCurve.h"
|
||||
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotTrace.h"
|
||||
#include "RiuWellLogTracePlot.h"
|
||||
#include "qwt_plot_curve.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
@ -184,6 +185,16 @@ void RimWellLogExtractionCurve::updatePlotData()
|
||||
if (wellLogPlot)
|
||||
{
|
||||
wellLogPlot->updateAvailableDepthRange();
|
||||
|
||||
if (wellLogPlot->traceCount() == 1)
|
||||
{
|
||||
RimWellLogPlotTrace* plotTrace;
|
||||
firstAnchestorOrThisOfType(plotTrace);
|
||||
if (plotTrace && plotTrace->curveCount() == 1)
|
||||
{
|
||||
wellLogPlot->setVisibleDepthRangeFromContents();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -277,6 +277,15 @@ void RimWellLogPlot::updateAxisRanges()
|
||||
if (m_viewer) m_viewer->setDepthRange(m_minimumVisibleDepth, m_maximumVisibleDepth);
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlot::setVisibleDepthRangeFromContents()
|
||||
{
|
||||
setDepthRange(m_depthRangeMinimum, m_depthRangeMaximum);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -56,6 +56,8 @@ public:
|
||||
|
||||
void visibleDepthRange(double* minimumDepth, double* maximumDepth) const;
|
||||
void updateAxisRanges();
|
||||
void setVisibleDepthRangeFromContents();
|
||||
|
||||
protected:
|
||||
|
||||
// Overridden PDM methods
|
||||
|
Loading…
Reference in New Issue
Block a user