#1573 Set unit system on well path

This commit is contained in:
Bjørnar Grip Fjær
2017-06-07 11:57:25 +02:00
parent ac447c0486
commit 1414751859
16 changed files with 278 additions and 6 deletions

View File

@@ -18,6 +18,8 @@
#include "RicNewFishbonesSubsFeature.h"
#include "WellPathCommands/RicWellPathsUnitSystemSettingsImpl.h"
#include "RiaApplication.h"
#include "RimProject.h"
@@ -45,6 +47,10 @@ void RicNewFishbonesSubsFeature::onActionTriggered(bool isChecked)
RimFishbonesCollection* fishbonesCollection = selectedFishbonesCollection();
CVF_ASSERT(fishbonesCollection);
RimWellPath* wellPath;
fishbonesCollection->firstAncestorOrThisOfTypeAsserted(wellPath);
if (!RicWellPathsUnitSystemSettingsImpl::ensureHasUnitSystem(wellPath)) return;
RimFishbonesMultipleSubs* obj = new RimFishbonesMultipleSubs;
obj->setName(QString("Fishbones Subs (%1)").arg(fishbonesCollection->fishbonesSubs.size()));
fishbonesCollection->appendFishbonesSubs(obj);