mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 15:26:48 -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;
|
ColorMode colorMode() const;
|
||||||
EnsembleParameterType currentEnsembleParameterType() const;
|
EnsembleParameterType currentEnsembleParameterType() const;
|
||||||
|
|
||||||
|
void updateAllCurves();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
caf::PdmFieldHandle* objectToggleField();
|
caf::PdmFieldHandle* objectToggleField();
|
||||||
@ -110,7 +112,6 @@ private:
|
|||||||
|
|
||||||
void updateCurveColors();
|
void updateCurveColors();
|
||||||
void updateQwtPlotAxis();
|
void updateQwtPlotAxis();
|
||||||
void updateAllCurves();
|
|
||||||
std::vector<QString> ensembleParameters() const;
|
std::vector<QString> ensembleParameters() const;
|
||||||
|
|
||||||
QString createAutoName() const;
|
QString createAutoName() const;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "RimSummaryCaseCollection.h"
|
#include "RimSummaryCaseCollection.h"
|
||||||
|
|
||||||
#include "RimGridSummaryCase.h"
|
#include "RimGridSummaryCase.h"
|
||||||
|
#include "RimEnsembleCurveSet.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimSummaryCase.h"
|
#include "RimSummaryCase.h"
|
||||||
|
|
||||||
@ -43,6 +44,7 @@ RimSummaryCaseCollection::RimSummaryCaseCollection()
|
|||||||
RimSummaryCaseCollection::~RimSummaryCaseCollection()
|
RimSummaryCaseCollection::~RimSummaryCaseCollection()
|
||||||
{
|
{
|
||||||
m_cases.deleteAllChildObjects();
|
m_cases.deleteAllChildObjects();
|
||||||
|
updateReferringCurveSets();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -51,6 +53,7 @@ RimSummaryCaseCollection::~RimSummaryCaseCollection()
|
|||||||
void RimSummaryCaseCollection::removeCase(RimSummaryCase* summaryCase)
|
void RimSummaryCaseCollection::removeCase(RimSummaryCase* summaryCase)
|
||||||
{
|
{
|
||||||
m_cases.removeChildObject(summaryCase);
|
m_cases.removeChildObject(summaryCase);
|
||||||
|
updateReferringCurveSets();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -59,6 +62,7 @@ void RimSummaryCaseCollection::removeCase(RimSummaryCase* summaryCase)
|
|||||||
void RimSummaryCaseCollection::addCase(RimSummaryCase* summaryCase)
|
void RimSummaryCaseCollection::addCase(RimSummaryCase* summaryCase)
|
||||||
{
|
{
|
||||||
m_cases.push_back(summaryCase);
|
m_cases.push_back(summaryCase);
|
||||||
|
updateReferringCurveSets();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -92,3 +96,19 @@ caf::PdmFieldHandle* RimSummaryCaseCollection::userDescriptionField()
|
|||||||
{
|
{
|
||||||
return &m_name;
|
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:
|
private:
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
|
void updateReferringCurveSets() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmChildArrayField<RimSummaryCase*> m_cases;
|
caf::PdmChildArrayField<RimSummaryCase*> m_cases;
|
||||||
|
Loading…
Reference in New Issue
Block a user