#1147 - pre-proto - Adding index number to names for new fractures

This commit is contained in:
astridkbjorke
2017-01-31 15:54:04 +01:00
parent 046060cd04
commit 3a5247e357
4 changed files with 26 additions and 6 deletions

View File

@@ -60,12 +60,17 @@ void RicNewSimWellFractureFeature::onActionTriggered(bool isChecked)
RimSimWellFracture* fracture = new RimSimWellFracture();
fractureCollection->simwellFractures.push_back(fracture);
fracture->name = "Simulation Well Fracture";
RimOilField* oilfield = nullptr;
objHandle->firstAncestorOrThisOfType(oilfield);
if (!oilfield) return;
std::vector<RimFracture* > oldFractures;
oilfield->descendantsIncludingThisOfType(oldFractures);
QString fracNum = QString("%1").arg(oldFractures.size(), 2, 10, QChar('0'));
fracture->name = QString("Fracture_") + fracNum;
if (oilfield->fractureDefinitionCollection->fractureDefinitions.size() > 0)
{
RimEllipseFractureTemplate* fracDef = oilfield->fractureDefinitionCollection->fractureDefinitions[0];