mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
#2842 Ensemble curve set. Update referring curve sets when adding or removing cases from an ensemble
This commit is contained in:
parent
6f275e0915
commit
9150981e13
@ -88,6 +88,8 @@ public:
|
||||
ColorMode colorMode() const;
|
||||
EnsembleParameterType currentEnsembleParameterType() const;
|
||||
|
||||
void updateAllCurves();
|
||||
|
||||
private:
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
caf::PdmFieldHandle* objectToggleField();
|
||||
@ -110,7 +112,6 @@ private:
|
||||
|
||||
void updateCurveColors();
|
||||
void updateQwtPlotAxis();
|
||||
void updateAllCurves();
|
||||
std::vector<QString> ensembleParameters() const;
|
||||
|
||||
QString createAutoName() const;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "RimSummaryCaseCollection.h"
|
||||
|
||||
#include "RimGridSummaryCase.h"
|
||||
#include "RimEnsembleCurveSet.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimSummaryCase.h"
|
||||
|
||||
@ -43,6 +44,7 @@ RimSummaryCaseCollection::RimSummaryCaseCollection()
|
||||
RimSummaryCaseCollection::~RimSummaryCaseCollection()
|
||||
{
|
||||
m_cases.deleteAllChildObjects();
|
||||
updateReferringCurveSets();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -51,6 +53,7 @@ RimSummaryCaseCollection::~RimSummaryCaseCollection()
|
||||
void RimSummaryCaseCollection::removeCase(RimSummaryCase* summaryCase)
|
||||
{
|
||||
m_cases.removeChildObject(summaryCase);
|
||||
updateReferringCurveSets();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -59,6 +62,7 @@ void RimSummaryCaseCollection::removeCase(RimSummaryCase* summaryCase)
|
||||
void RimSummaryCaseCollection::addCase(RimSummaryCase* summaryCase)
|
||||
{
|
||||
m_cases.push_back(summaryCase);
|
||||
updateReferringCurveSets();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -92,3 +96,19 @@ caf::PdmFieldHandle* RimSummaryCaseCollection::userDescriptionField()
|
||||
{
|
||||
return &m_name;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryCaseCollection::updateReferringCurveSets() const
|
||||
{
|
||||
// Update curve set referring to this group
|
||||
std::vector<PdmObjectHandle*> referringObjects;
|
||||
objectsWithReferringPtrFields(referringObjects);
|
||||
|
||||
for (PdmObjectHandle* obj : referringObjects)
|
||||
{
|
||||
RimEnsembleCurveSet* curveSet = dynamic_cast<RimEnsembleCurveSet*>(obj);
|
||||
if (curveSet) curveSet->updateAllCurves();
|
||||
}
|
||||
}
|
||||
|
@ -42,6 +42,7 @@ public:
|
||||
|
||||
private:
|
||||
caf::PdmFieldHandle* userDescriptionField() override;
|
||||
void updateReferringCurveSets() const;
|
||||
|
||||
private:
|
||||
caf::PdmChildArrayField<RimSummaryCase*> m_cases;
|
||||
|
Loading…
Reference in New Issue
Block a user