(#396) Save/Restore of WellLog plots partly in place.

Cleaned up ownership in WellLog plot classes
initAfterRead() is implemented
moved code related to command features from the WellLog classes
Still plots are not redrawn/reloaded when opening a project file.
This commit is contained in:
Jacob Støren
2015-09-02 16:46:30 +02:00
parent 30e2495849
commit 2a8533bad0
9 changed files with 44 additions and 44 deletions

View File

@@ -46,7 +46,7 @@ RimWellLogPlotTrace::RimWellLogPlotTrace()
CAF_PDM_InitFieldNoDefault(&curves, "Curves", "", "", "", "");
curves.uiCapability()->setUiHidden(true);
m_viewer = NULL;
m_viewer = new RiuWellLogTracePlot;
}
//--------------------------------------------------------------------------------------------------
@@ -64,7 +64,7 @@ void RimWellLogPlotTrace::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
{
if (changedField == &show)
{
m_viewer->setVisible(newValue == true);
m_viewer->setVisible(show());
}
}
@@ -87,20 +87,6 @@ void RimWellLogPlotTrace::addCurve(RimWellLogPlotCurve* curve)
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrace::setViewer(RiuWellLogTracePlot* viewer)
{
if (m_viewer)
{
delete m_viewer;
}
m_viewer = viewer;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -154,3 +140,14 @@ bool RimWellLogPlotTrace::availableDepthRange(double* minimumDepth, double* maxi
return rangeUpdated;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotTrace::initAfterRead()
{
for(size_t cIdx = 0; cIdx < curves.size(); ++cIdx)
{
curves[cIdx]->setPlot(this->m_viewer);
}
}