#14101 Make Fault Distance objects deletable

Enable the standard tree Delete action on RimFaultDistance via
setDeletable( true ). On deletion, remove the generated FAULTDIST result
from the case in the destructor; the object is still attached to the
project tree while the destructor body runs, so the owner case is
reachable.
This commit is contained in:
Kristian Bendiksen authored and Magne Sjaastad committed 2026-06-08 21:42:19 +02:00
1 parent 12cd173c62
commit a90e7bb26a
2 files changed
+12

No files matched your search

@@ -59,6 +59,17 @@ RimFaultDistance::RimFaultDistance()
CAF_PDM_InitFieldNoDefault( &m_generateButton, "Generate", "" );
caf::PdmUiPushButtonEditor::configureEditorLabelLeft( &m_generateButton );
setDeletable( true );
}
//--------------------------------------------------------------------------------------------------
/// Remove the generated result from the case when the object is deleted. The object is still
/// attached to the project tree while this destructor body runs, so the owner case is reachable.
//--------------------------------------------------------------------------------------------------
RimFaultDistance::~RimFaultDistance()
{
removeGeneratedResult( m_resultName() );
}
//--------------------------------------------------------------------------------------------------