mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#504) Move common code to base class
This commit is contained in:
parent
f49c7fc983
commit
7ded798055
@ -217,31 +217,7 @@ void RimWellLogExtractionCurve::updatePlotData()
|
||||
|
||||
if (filteredValues.size())
|
||||
{
|
||||
RimWellLogPlotTrack* plotTrack;
|
||||
firstAnchestorOrThisOfType(plotTrack);
|
||||
|
||||
if (plotTrack)
|
||||
{
|
||||
plotTrack->updateXAxisRangeFromCurves();
|
||||
}
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
|
||||
if (wellLogPlot && plotTrack)
|
||||
{
|
||||
bool setDepthRange = !wellLogPlot->hasAvailableDepthRange();
|
||||
wellLogPlot->updateAvailableDepthRange();
|
||||
|
||||
if (setDepthRange)
|
||||
{
|
||||
wellLogPlot->setVisibleDepthRangeFromContents();
|
||||
}
|
||||
else if (plotTrack->curveCount() == 1)
|
||||
{
|
||||
plotTrack->updateAxisRangesAndReplot();
|
||||
}
|
||||
}
|
||||
updateTrackAndPlotFromCurveData();
|
||||
}
|
||||
|
||||
m_plot->replot();
|
||||
|
@ -93,6 +93,10 @@ void RimWellLogFileCurve::updatePlotData()
|
||||
{
|
||||
m_plotCurve->setSamples(NULL, NULL, 0);
|
||||
}
|
||||
|
||||
updateTrackAndPlotFromCurveData();
|
||||
|
||||
m_plot->replot();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,10 @@
|
||||
|
||||
#include "RimWellLogPlot.h"
|
||||
|
||||
#include "RiuWellLogTrackPlot.h"
|
||||
#include "RimWellLogPlotTrack.h"
|
||||
|
||||
#include "RiuWellLogPlotCurve.h"
|
||||
#include "RiuWellLogTrackPlot.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
@ -279,3 +281,35 @@ void RimWellLogPlotCurve::updateOptionSensitivity()
|
||||
{
|
||||
m_customCurveName.uiCapability()->setUiReadOnly(!m_useCustomCurveName);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCurve::updateTrackAndPlotFromCurveData()
|
||||
{
|
||||
RimWellLogPlotTrack* plotTrack;
|
||||
firstAnchestorOrThisOfType(plotTrack);
|
||||
|
||||
if (plotTrack)
|
||||
{
|
||||
plotTrack->updateXAxisRangeFromCurves();
|
||||
}
|
||||
|
||||
RimWellLogPlot* wellLogPlot;
|
||||
firstAnchestorOrThisOfType(wellLogPlot);
|
||||
|
||||
if (wellLogPlot && plotTrack)
|
||||
{
|
||||
bool setDepthRange = !wellLogPlot->hasAvailableDepthRange();
|
||||
wellLogPlot->updateAvailableDepthRange();
|
||||
|
||||
if (setDepthRange)
|
||||
{
|
||||
wellLogPlot->setVisibleDepthRangeFromContents();
|
||||
}
|
||||
else if (plotTrack->curveCount() == 1)
|
||||
{
|
||||
plotTrack->updateAxisRangesAndReplot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user