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
@@ -63,6 +63,8 @@ RimEllipseFractureTemplate::RimEllipseFractureTemplate()
|
||||
createFractureGridAndAssignConductivities();
|
||||
|
||||
// clang-format on
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -45,6 +45,8 @@ RimFishboneWellPath::RimFishboneWellPath()
|
||||
m_displayCoordinates.uiCapability()->setUiReadOnly( true );
|
||||
m_displayCoordinates.uiCapability()->setUiEditorTypeName( caf::PdmUiTextEditor::uiEditorTypeName() );
|
||||
m_displayCoordinates.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LabelPosType::TOP );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -155,6 +155,7 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
|
||||
m_pipeProperties = new RimFishbonesPipeProperties;
|
||||
|
||||
m_rigFishbonesGeometry = std::unique_ptr<RigFisbonesGeometry>( new RigFisbonesGeometry( this ) );
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -436,3 +436,27 @@ int RimFractureTemplateCollection::nextFractureTemplateId()
|
||||
|
||||
return newId;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplateCollection::onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects )
|
||||
{
|
||||
RimProject* proj = nullptr;
|
||||
firstAncestorOrThisOfType( proj );
|
||||
if ( proj )
|
||||
{
|
||||
proj->scheduleCreateDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
|
||||
std::vector<Rim3dView*> views;
|
||||
proj->allVisibleViews( views );
|
||||
for ( Rim3dView* visibleView : views )
|
||||
{
|
||||
if ( dynamic_cast<RimEclipseView*>( visibleView ) )
|
||||
{
|
||||
visibleView->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,9 @@ public:
|
||||
|
||||
void updateFilePathsFromProjectPath( const QString& newProjectPath, const QString& oldProjectPath );
|
||||
|
||||
void onChildDeleted( caf::PdmChildArrayFieldHandle* childArray,
|
||||
std::vector<caf::PdmObjectHandle*>& referringObjects ) override;
|
||||
|
||||
protected:
|
||||
void initAfterRead() override;
|
||||
|
||||
|
||||
@@ -64,6 +64,8 @@ RimPerforationInterval::RimPerforationInterval()
|
||||
m_startMD.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
m_endMD.uiCapability()->setUiEditorTypeName(caf::PdmUiDoubleSliderEditor::uiEditorTypeName());
|
||||
// clang-format on
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -50,6 +50,8 @@ RimSimWellFracture::RimSimWellFracture( void )
|
||||
m_displayIJK.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitField( &m_branchIndex, "Branch", 0, "Branch", "", "", "" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -32,6 +32,8 @@ RimSimWellFractureCollection::RimSimWellFractureCollection( void )
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &simwellFractures, "Fractures", "", "", "", "" );
|
||||
simwellFractures.uiCapability()->setUiHidden( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -88,6 +88,7 @@ RimStimPlanFractureTemplate::RimStimPlanFractureTemplate()
|
||||
m_readError = false;
|
||||
|
||||
// clang-format on
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -39,6 +39,8 @@ RimWellPathFracture::RimWellPathFracture( void )
|
||||
|
||||
CAF_PDM_InitField( &m_measuredDepth, "MeasuredDepth", 0.0f, "Measured Depth Location", "", "", "" );
|
||||
m_measuredDepth.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -45,6 +45,8 @@ RimWellPathFractureCollection::RimWellPathFractureCollection( void )
|
||||
|
||||
CAF_PDM_InitField( &m_refMDType_OBSOLETE, "RefMDType", std::numeric_limits<int>::max(), "Reference MD", "", "", "" );
|
||||
CAF_PDM_InitField( &m_refMD_OBSOLETE, "RefMD", std::numeric_limits<double>::infinity(), "", "", "", "" );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -62,6 +62,8 @@ RimWellPathValve::RimWellPathValve()
|
||||
m_createValveTemplate.uiCapability()->setUiEditorTypeName( caf::PdmUiToolButtonEditor::uiEditorTypeName() );
|
||||
|
||||
nameField()->uiCapability()->setUiReadOnly( true );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user