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:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user