mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#579) Removing well log extractors with case references in case destructors
This commit is contained in:
parent
eb9f909fb1
commit
52f1e47576
@ -161,19 +161,6 @@ void RicCloseCaseFeature::deleteEclipseCase(RimEclipseCase* eclipseCase)
|
|||||||
removeCaseFromAllGroups(eclipseCase);
|
removeCaseFromAllGroups(eclipseCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
RimProject* project = RiaApplication::instance()->project();
|
|
||||||
if (project)
|
|
||||||
{
|
|
||||||
if (project->mainPlotCollection())
|
|
||||||
{
|
|
||||||
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
|
||||||
if (plotCollection)
|
|
||||||
{
|
|
||||||
plotCollection->removeExtractors(eclipseCase->reservoirData());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
delete eclipseCase;
|
delete eclipseCase;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -193,19 +180,6 @@ void RicCloseCaseFeature::deleteGeoMechCase(RimGeoMechCase* geoMechCase)
|
|||||||
models->updateConnectedEditors();
|
models->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
|
||||||
RimProject* project = RiaApplication::instance()->project();
|
|
||||||
if (project)
|
|
||||||
{
|
|
||||||
if (project->mainPlotCollection())
|
|
||||||
{
|
|
||||||
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
|
||||||
if (plotCollection)
|
|
||||||
{
|
|
||||||
plotCollection->removeExtractors(geoMechCase->geoMechData());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
delete geoMechCase;
|
delete geoMechCase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,9 @@
|
|||||||
#include "RimEclipsePropertyFilterCollection.h"
|
#include "RimEclipsePropertyFilterCollection.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
#include "RimReservoirCellResultsStorage.h"
|
#include "RimReservoirCellResultsStorage.h"
|
||||||
|
#include "RimProject.h"
|
||||||
|
#include "RimMainPlotCollection.h"
|
||||||
|
#include "RimWellLogPlotCollection.h"
|
||||||
|
|
||||||
#include "cafPdmDocument.h"
|
#include "cafPdmDocument.h"
|
||||||
#include "cafProgressInfo.h"
|
#include "cafProgressInfo.h"
|
||||||
@ -91,6 +94,19 @@ RimEclipseCase::~RimEclipseCase()
|
|||||||
delete m_matrixModelResults();
|
delete m_matrixModelResults();
|
||||||
delete m_fractureModelResults();
|
delete m_fractureModelResults();
|
||||||
|
|
||||||
|
RimProject* project = RiaApplication::instance()->project();
|
||||||
|
if (project)
|
||||||
|
{
|
||||||
|
if (project->mainPlotCollection())
|
||||||
|
{
|
||||||
|
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
||||||
|
if (plotCollection)
|
||||||
|
{
|
||||||
|
plotCollection->removeExtractors(this->reservoirData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this->reservoirData())
|
if (this->reservoirData())
|
||||||
{
|
{
|
||||||
// At this point, we assume that memory should be released
|
// At this point, we assume that memory should be released
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
#include "RifOdbReader.h"
|
#include "RifOdbReader.h"
|
||||||
#include "RigGeoMechCaseData.h"
|
#include "RigGeoMechCaseData.h"
|
||||||
#include "RigFemPartResultsCollection.h"
|
#include "RigFemPartResultsCollection.h"
|
||||||
|
#include "RimProject.h"
|
||||||
|
#include "RimMainPlotCollection.h"
|
||||||
|
#include "RimWellLogPlotCollection.h"
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
@ -47,6 +50,25 @@ RimGeoMechCase::RimGeoMechCase(void)
|
|||||||
RimGeoMechCase::~RimGeoMechCase(void)
|
RimGeoMechCase::~RimGeoMechCase(void)
|
||||||
{
|
{
|
||||||
geoMechViews.deleteAllChildObjects();
|
geoMechViews.deleteAllChildObjects();
|
||||||
|
|
||||||
|
RimProject* project = RiaApplication::instance()->project();
|
||||||
|
if (project)
|
||||||
|
{
|
||||||
|
if (project->mainPlotCollection())
|
||||||
|
{
|
||||||
|
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
|
||||||
|
if (plotCollection)
|
||||||
|
{
|
||||||
|
plotCollection->removeExtractors(this->geoMechData());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this->geoMechData())
|
||||||
|
{
|
||||||
|
// At this point, we assume that memory should be released
|
||||||
|
CVF_ASSERT(this->geoMechData()->refCount() == 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user