mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1040 - pre-proto - Updating size of ellipse visualizing fracture when template height / halflength is updated
This commit is contained in:
parent
2a6cceff62
commit
31505c3b49
@ -19,6 +19,8 @@
|
||||
#include "RimFractureDefinition.h"
|
||||
|
||||
#include "cafPdmObject.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimFracture.h"
|
||||
|
||||
|
||||
|
||||
@ -73,6 +75,35 @@ caf::PdmFieldHandle* RimFractureDefinition::userDescriptionField()
|
||||
return &name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureDefinition::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||
{
|
||||
if (changedField == &halfLength || changedField == &height)
|
||||
{
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
//Regenerate geometry
|
||||
std::vector<RimFracture*> fractures;
|
||||
proj->descendantsIncludingThisOfType(fractures);
|
||||
|
||||
for (RimFracture* fracture : fractures)
|
||||
{
|
||||
if (fracture->attachedFractureDefinition() == this)
|
||||
{
|
||||
fracture->setRecomputeGeometryFlag();
|
||||
}
|
||||
}
|
||||
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmFieldHandle.h"
|
||||
#include "cafPdmObject.h"
|
||||
|
||||
|
||||
@ -52,7 +53,8 @@ public:
|
||||
};
|
||||
caf::PdmField< caf::AppEnum< FracOrientationEnum > > orientation;
|
||||
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering);
|
||||
|
@ -143,18 +143,14 @@ void RimWellPathFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedFie
|
||||
|
||||
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
|
||||
positionAtWellpath = wellPathGeometry->interpolatedPointAlongWellPath(measuredDepth);
|
||||
|
||||
//wellPath->partMgr()->scheduleGeometryRegen();
|
||||
|
||||
setRecomputeGeometryFlag();
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
setRecomputeGeometryFlag();
|
||||
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj) proj->createDisplayModelAndRedrawAllViews();
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user