#1144 - pre-proto - Updating azimuth angles for fractures for connected fractures with this angle when angle is update in template.

This commit is contained in:
astridkbjorke
2017-02-01 10:49:50 +01:00
parent 701687b171
commit 3e65bcfa88
3 changed files with 31 additions and 1 deletions

View File

@@ -107,6 +107,34 @@ void RimEllipseFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* cha
proj->createDisplayModelAndRedrawAllViews();
}
}
if (changedField == &azimuthAngle)
{
RimProject* proj;
this->firstAncestorOrThisOfType(proj);
if (proj)
{
std::vector<RimFracture*> fractures;
proj->descendantsIncludingThisOfType(fractures);
for (RimFracture* fracture : fractures)
{
if (fracture->attachedFractureDefinition() == this)
{
if (abs(oldValue.toDouble() - fracture->azimuth()) < 1e-5 )
{
fracture->azimuth = azimuthAngle;
fracture->setRecomputeGeometryFlag();
}
}
}
proj->createDisplayModelAndRedrawAllViews();
}
}
}
//--------------------------------------------------------------------------------------------------