mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#579) Removing cached well log extractors when deleting cases and well paths
Cached well log extractors with references to well paths or cases to be deleted are removed before deletion.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
#include "cafPdmUiTreeView.h"
|
||||
#include "RigCaseData.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RigEclipseWellLogExtractor.h"
|
||||
@@ -125,3 +126,53 @@ RimWellLogPlot* RimWellLogPlotCollection::wellLogPlotFromViewer(RiuWellLogPlot*
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCollection::removeExtractors(const RigWellPath* wellPath)
|
||||
{
|
||||
for (int eIdx = (int) m_extractors.size() - 1; eIdx >= 0; eIdx--)
|
||||
{
|
||||
if (m_extractors[eIdx]->wellPathData() == wellPath)
|
||||
{
|
||||
m_extractors.eraseAt(eIdx);
|
||||
}
|
||||
}
|
||||
|
||||
for (int eIdx = (int) m_geomExtractors.size() - 1; eIdx >= 0; eIdx--)
|
||||
{
|
||||
if (m_geomExtractors[eIdx]->wellPathData() == wellPath)
|
||||
{
|
||||
m_geomExtractors.eraseAt(eIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCollection::removeExtractors(const RigCaseData* caseData)
|
||||
{
|
||||
for (int eIdx = (int) m_extractors.size() - 1; eIdx >= 0; eIdx--)
|
||||
{
|
||||
if (m_extractors[eIdx]->caseData() == caseData)
|
||||
{
|
||||
m_extractors.eraseAt(eIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogPlotCollection::removeExtractors(const RigGeoMechCaseData* caseData)
|
||||
{
|
||||
for (int eIdx = (int) m_geomExtractors.size() - 1; eIdx >= 0; eIdx--)
|
||||
{
|
||||
if (m_geomExtractors[eIdx]->caseData() == caseData)
|
||||
{
|
||||
m_geomExtractors.eraseAt(eIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user