#2298 Fracture. Update fracture colors when changing stim plan legend settings

This commit is contained in:
Bjørn Erik Jensen
2018-01-02 11:21:37 +01:00
parent 79818cecac
commit 70a3df3b3c
3 changed files with 32 additions and 16 deletions

View File

@@ -179,22 +179,7 @@ void RimStimPlanColors::fieldChangedByUi(const caf::PdmFieldHandle* changedField
if (changedField == &m_resultNameAndUnit)
{
//Get all frac templates and re-generate stimplan cells
RimProject* proj;
this->firstAncestorOrThisOfType(proj);
if (proj)
{
std::vector<RimStimPlanFractureTemplate*> stimPlanFracTemplates;
proj->descendantsIncludingThisOfType(stimPlanFracTemplates);
for (RimStimPlanFractureTemplate* stimPlanFracTemplate : stimPlanFracTemplates)
{
stimPlanFracTemplate->updateFractureGrid();
}
proj->createDisplayModelAndRedrawAllViews();
}
updateStimPlanTemplates();
}
}
@@ -281,6 +266,26 @@ void RimStimPlanColors::updateLegendData()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimStimPlanColors::updateStimPlanTemplates() const
{
//Get all frac templates and re-generate stimplan cells
RimProject* proj;
this->firstAncestorOrThisOfType(proj);
if (proj)
{
std::vector<RimStimPlanFractureTemplate*> stimPlanFracTemplates;
proj->descendantsIncludingThisOfType(stimPlanFracTemplates);
for (RimStimPlanFractureTemplate* stimPlanFracTemplate : stimPlanFracTemplates)
{
stimPlanFracTemplate->updateFractureGrid();
}
proj->createDisplayModelAndRedrawAllViews();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------