#3285 Make context menu for well path attributes a bit more robust

This commit is contained in:
Gaute Lindkvist
2018-08-29 13:43:48 +02:00
parent 8e73f132cf
commit 9262873846
2 changed files with 32 additions and 32 deletions

View File

@@ -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();
}
}