pre-proto - Update of stimPlanCells when changing facture color property or stimPlanFracTemplate activeTimeStep

This commit is contained in:
astridkbjorke
2017-04-07 12:46:09 +02:00
parent 4295928af6
commit 51e9ef67b8
2 changed files with 25 additions and 2 deletions

View File

@@ -23,6 +23,7 @@
#include "RimLegendConfig.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimStimPlanFractureTemplate.h"
#include "cafPdmUiDoubleSliderEditor.h"
#include "cafPdmUiItem.h"
@@ -166,6 +167,26 @@ void RimStimPlanColors::fieldChangedByUi(const caf::PdmFieldHandle* changedField
{
sourceView->scheduleCreateDisplayModelAndRedraw();
}
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->setupStimPlanCells();
}
proj->createDisplayModelAndRedrawAllViews();
}
}
}
//--------------------------------------------------------------------------------------------------