mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8084 StimPlan Model: Dangling annotations when changing MD
This commit is contained in:
@@ -752,16 +752,14 @@ void RimStimPlanModel::updateDistanceToBarrierAndDip()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStimPlanModel::clearBarrierAnnotation()
|
||||
{
|
||||
RimAnnotationCollectionBase* coll = annotationCollection();
|
||||
|
||||
auto existingTextAnnotation = m_barrierTextAnnotation.value();
|
||||
if ( existingTextAnnotation )
|
||||
if ( coll && existingTextAnnotation )
|
||||
{
|
||||
coll->removeAnnotation( existingTextAnnotation );
|
||||
delete existingTextAnnotation;
|
||||
m_barrierTextAnnotation = nullptr;
|
||||
}
|
||||
|
||||
RimAnnotationCollectionBase* coll = annotationCollection();
|
||||
if ( coll )
|
||||
{
|
||||
coll->onAnnotationDeleted();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user