mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1410 - pre-proto - stimplan timestep set to readonly for fracture and value is taken from fracture template.
This commit is contained in:
parent
50f71a873e
commit
7646b3fcf0
@ -284,7 +284,6 @@ void RivWellFracturePartMgr::generateStimPlanMeshPart(caf::DisplayCoordTransform
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<cvf::DrawableGeo> RivWellFracturePartMgr::createStimPlanMeshDrawable(RimStimPlanFractureTemplate* stimPlanFracTemplate, caf::DisplayCoordTransform* displayCoordTransform)
|
||||
{
|
||||
//TODO: Kjør setupStimPlanCells igjen, siden parametere kan ha endre seg...
|
||||
stimPlanFracTemplate->setupStimPlanCells();
|
||||
|
||||
std::vector<RigStimPlanCell> stimPlanCells = stimPlanFracTemplate->getStimPlanCells();
|
||||
@ -302,7 +301,6 @@ cvf::ref<cvf::DrawableGeo> RivWellFracturePartMgr::createStimPlanMeshDrawable(Ri
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cvf::Mat4f m = m_rimFracture->transformMatrix();
|
||||
std::vector<cvf::Vec3f> stimPlanMeshVerticesDisplayCoords = transfromToFractureDisplayCoords(stimPlanMeshVertices, m, displayCoordTransform);
|
||||
|
||||
|
@ -186,7 +186,7 @@ void RimFracture::fieldChangedByUi(const caf::PdmFieldHandle* changedField, cons
|
||||
RimStimPlanFractureTemplate* stimPlanFracTemplate = dynamic_cast<RimStimPlanFractureTemplate*>(attachedFractureDefinition());
|
||||
if (stimPlanFracTemplate)
|
||||
{
|
||||
stimPlanTimeIndexToPlot = static_cast<int>(stimPlanFracTemplate->getStimPlanTimeValues().size() - 1);
|
||||
stimPlanTimeIndexToPlot = stimPlanFracTemplate->activeTimeStepIndex;
|
||||
}
|
||||
}
|
||||
|
||||
@ -397,6 +397,7 @@ void RimFracture::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiO
|
||||
if (dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate))
|
||||
{
|
||||
stimPlanTimeIndexToPlot.uiCapability()->setUiHidden(false);
|
||||
stimPlanTimeIndexToPlot.uiCapability()->setUiReadOnly(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -497,7 +498,7 @@ void RimFracture::setFractureTemplate(RimFractureTemplate* fractureTemplate)
|
||||
RimStimPlanFractureTemplate* stimPlanFracTemplate = dynamic_cast<RimStimPlanFractureTemplate*>(attachedFractureDefinition());
|
||||
if (stimPlanFracTemplate)
|
||||
{
|
||||
stimPlanTimeIndexToPlot = static_cast<int>(stimPlanFracTemplate->getStimPlanTimeValues().size() - 1);
|
||||
stimPlanTimeIndexToPlot = stimPlanFracTemplate->activeTimeStepIndex;
|
||||
}
|
||||
|
||||
this->updateAzimuthFromFractureDefinition();
|
||||
|
@ -88,6 +88,28 @@ void RimStimPlanFractureTemplate::fieldChangedByUi(const caf::PdmFieldHandle* ch
|
||||
setDefaultsBasedOnXMLfile();
|
||||
}
|
||||
|
||||
if (&activeTimeStepIndex == changedField)
|
||||
{
|
||||
//Changes to this parameters should change all fractures with this fracture template attached.
|
||||
RimProject* proj;
|
||||
this->firstAncestorOrThisOfType(proj);
|
||||
if (proj)
|
||||
{
|
||||
std::vector<RimFracture*> fractures;
|
||||
proj->descendantsIncludingThisOfType(fractures);
|
||||
for (RimFracture* fracture : fractures)
|
||||
{
|
||||
if (fracture->attachedFractureDefinition() == this)
|
||||
{
|
||||
fracture->stimPlanTimeIndexToPlot = activeTimeStepIndex;
|
||||
fracture->setRecomputeGeometryFlag();
|
||||
}
|
||||
}
|
||||
proj->createDisplayModelAndRedrawAllViews();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (&wellPathDepthAtFracture == changedField || ¶meterForPolygon == changedField || &activeTimeStepIndex == changedField || &showStimPlanMesh == changedField)
|
||||
{
|
||||
RimProject* proj;
|
||||
|
Loading…
Reference in New Issue
Block a user