mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3285 Make context menu for well path attributes a bit more robust
This commit is contained in:
@@ -54,13 +54,11 @@ void RicDeleteWellPathAttributeFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimWellPathAttributeCollection* wellPathAttributeCollection = nullptr;
|
||||
attributes[0]->firstAncestorOrThisOfTypeAsserted(wellPathAttributeCollection);
|
||||
RimWellPath* wellPath = nullptr;
|
||||
wellPathAttributeCollection->firstAncestorOrThisOfTypeAsserted(wellPath);
|
||||
for (RimWellPathAttribute* attributeToDelete : attributes)
|
||||
{
|
||||
wellPathAttributeCollection->deleteAttribute(attributeToDelete);
|
||||
}
|
||||
wellPath->updateConnectedEditors();
|
||||
wellPathAttributeCollection->updateAllRequiredEditors();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user