mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user