Refactor delete operations for pdm objects.

This commit is contained in:
Kristian Bendiksen
2020-05-18 16:02:27 +02:00
committed by Magne Sjaastad
parent 80ee1256e7
commit c366e85682
90 changed files with 474 additions and 438 deletions

View File

@@ -19,12 +19,17 @@
#include "RimWellLogPlotCollection.h"
#include "RiaGuiApplication.h"
#include "RiuPlotMainWindow.h"
#include "RigEclipseWellLogExtractor.h"
#include "RigGeoMechCaseData.h"
#include "RigGeoMechWellLogExtractor.h"
#include "RimEclipseCase.h"
#include "RimGeoMechCase.h"
#include "RimProject.h"
#include "RimWellLogPlot.h"
#include "RimWellPath.h"
#include "RimWellPathCollection.h"
@@ -206,3 +211,20 @@ void RimWellLogPlotCollection::removeExtractors( const RigGeoMechCaseData* caseD
}
}
}
void RimWellLogPlotCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
std::vector<caf::PdmObjectHandle*>& referringObjects )
{
// Make sure the plot collection disappears with the last plot
if ( wellLogPlots.empty() )
{
RimProject* project = RimProject::current();
if ( project )
{
project->updateConnectedEditors();
}
}
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
mainPlotWindow->updateWellLogPlotToolBar();
}