#3285 Simple guarding and header reorganisation

This commit is contained in:
Gaute Lindkvist 2018-08-30 09:37:10 +02:00
parent e93a07b43b
commit b603c5948e
2 changed files with 7 additions and 4 deletions

View File

@ -17,8 +17,9 @@
/////////////////////////////////////////////////////////////////////////////////
#include "RicDeleteWellPathAttributeFeature.h"
#include "RimWellPathAttributeCollection.h"
#include "RimWellPath.h"
#include "RimWellPathAttribute.h"
#include "RimWellPathAttributeCollection.h"
#include "cafSelectionManager.h"
#include <QAction>

View File

@ -72,9 +72,11 @@ void RicNewWellPathAttributeFeature::onActionTriggered(bool isChecked)
{
std::vector<RimWellPathAttributeCollection*> attributeCollections;
wellPath->descendantsIncludingThisOfType(attributeCollections);
attributeCollections[0]->insertAttribute(nullptr, new RimWellPathAttribute);
attributeCollections[0]->updateAllRequiredEditors();
if (!attributeCollections.empty())
{
attributeCollections[0]->insertAttribute(nullptr, new RimWellPathAttribute);
attributeCollections[0]->updateAllRequiredEditors();
}
}
}