(#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:
Pål Hagen committed 2015-10-22 11:31:34 +02:00
1 parent 6e0c6b89b1
commit 272c328da3
4 files changed
+104

No files matched your search

@@ -25,6 +25,9 @@
#include "RimTools.h"
#include "RimWellLogFile.h"
#include "RimWellPathCollection.h"
#include "RimProject.h"
#include "RimMainPlotCollection.h"
#include "RimWellLogPlotCollection.h"
#include "RivWellPathPartMgr.h"
#include "RiuMainWindow.h"
@@ -102,6 +105,21 @@ RimWellPath::~RimWellPath()
{
delete m_wellLogFile;
}
RimProject* project;
firstAnchestorOrThisOfType(project);
if (project)
{
if (project->mainPlotCollection())
{
RimWellLogPlotCollection* plotCollection = project->mainPlotCollection()->wellLogPlotCollection();
if (plotCollection)
{
plotCollection->removeExtractors(m_wellPath.p());
}
}
}
}