mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2298 Fracture. Update fracture colors when changing stim plan legend settings
This commit is contained in:
parent
79818cecac
commit
70a3df3b3c
@ -204,6 +204,15 @@ void RimLegendConfig::fieldChangedByUi(const caf::PdmFieldHandle* changedField,
|
||||
|
||||
view->updateCurrentTimeStepAndRedraw();
|
||||
}
|
||||
|
||||
// Update stim plan templates if relevant
|
||||
RimStimPlanColors* stimPlanColors;
|
||||
firstAncestorOrThisOfType(stimPlanColors);
|
||||
if (stimPlanColors)
|
||||
{
|
||||
stimPlanColors->updateStimPlanTemplates();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -58,6 +58,8 @@ public:
|
||||
void loadDataAndUpdate();
|
||||
void updateLegendData();
|
||||
|
||||
void updateStimPlanTemplates() const;
|
||||
|
||||
protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) override;
|
||||
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) override;
|
||||
|
Loading…
Reference in New Issue
Block a user