mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Refactor delete operations for pdm objects.
This commit is contained in:
committed by
Magne Sjaastad
parent
80ee1256e7
commit
c366e85682
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "RimFormationNamesCollection.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimFormationNames.h"
|
||||
|
||||
#include <QMessageBox>
|
||||
@@ -33,6 +34,8 @@ RimFormationNamesCollection::RimFormationNamesCollection()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_formationNamesList, "FormationNamesList", "Formations", "", "", "" );
|
||||
m_formationNamesList.uiCapability()->setUiHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -129,3 +132,16 @@ void RimFormationNamesCollection::updateFilePathsFromProjectPath( const QString&
|
||||
fmNames->updateFilePathsFromProjectPath( newProjectPath, oldProjectPath );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFormationNamesCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
for ( caf::PdmObjectHandle* reffingObj : referringObjects )
|
||||
{
|
||||
RimCase* aCase = dynamic_cast<RimCase*>( reffingObj );
|
||||
if ( aCase ) aCase->updateFormationNamesData();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user