mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1147 - pre-proto - Adding index number to names for new fractures
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user