mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3913 Source Case Stepping : Exclude ensemble and observed cases from list
This commit is contained in:
parent
6a340c5b99
commit
1ac998973e
@ -183,17 +183,17 @@ void RimSummaryPlotSourceStepping::defineUiOrdering(QString uiConfigName, caf::P
|
|||||||
QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions,
|
||||||
bool* useOptionsOnly)
|
bool* useOptionsOnly)
|
||||||
{
|
{
|
||||||
|
QList<caf::PdmOptionItemInfo> options;
|
||||||
|
|
||||||
if (fieldNeedingOptions == &m_placeholderForLabel)
|
if (fieldNeedingOptions == &m_placeholderForLabel)
|
||||||
{
|
{
|
||||||
return QList<caf::PdmOptionItemInfo>();
|
options;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fieldNeedingOptions == &m_summaryCase)
|
if (fieldNeedingOptions == &m_summaryCase)
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
auto summaryCases = RimSummaryPlotSourceStepping::summaryCasesForSourceStepping();
|
||||||
|
for (auto sumCase : summaryCases)
|
||||||
RimProject* proj = RiaApplication::instance()->project();
|
|
||||||
for (auto sumCase : proj->allSummaryCases())
|
|
||||||
{
|
{
|
||||||
options.append(caf::PdmOptionItemInfo(sumCase->caseName(), sumCase));
|
options.append(caf::PdmOptionItemInfo(sumCase->caseName(), sumCase));
|
||||||
}
|
}
|
||||||
@ -202,8 +202,6 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
|||||||
}
|
}
|
||||||
else if (fieldNeedingOptions == &m_ensemble)
|
else if (fieldNeedingOptions == &m_ensemble)
|
||||||
{
|
{
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
|
||||||
|
|
||||||
RimProject* proj = RiaApplication::instance()->project();
|
RimProject* proj = RiaApplication::instance()->project();
|
||||||
for (auto ensemble : proj->summaryGroups())
|
for (auto ensemble : proj->summaryGroups())
|
||||||
{
|
{
|
||||||
@ -216,8 +214,6 @@ QList<caf::PdmOptionItemInfo> RimSummaryPlotSourceStepping::calculateValueOption
|
|||||||
return options;
|
return options;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<caf::PdmOptionItemInfo> options;
|
|
||||||
|
|
||||||
std::vector<RifSummaryReaderInterface*> readers = summaryReadersForCurves();
|
std::vector<RifSummaryReaderInterface*> readers = summaryReadersForCurves();
|
||||||
if (!readers.empty())
|
if (!readers.empty())
|
||||||
{
|
{
|
||||||
@ -978,6 +974,30 @@ bool RimSummaryPlotSourceStepping::updateHistoryAndSummaryQuantityIfMatching(con
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RimSummaryCase*> RimSummaryPlotSourceStepping::summaryCasesForSourceStepping()
|
||||||
|
{
|
||||||
|
std::vector<RimSummaryCase*> cases;
|
||||||
|
|
||||||
|
RimProject* proj = RiaApplication::instance()->project();
|
||||||
|
for (auto sumCase : proj->allSummaryCases())
|
||||||
|
{
|
||||||
|
if (sumCase->isObservedData()) continue;
|
||||||
|
|
||||||
|
RimSummaryCaseCollection* sumCaseColl = nullptr;
|
||||||
|
sumCase->firstAncestorOrThisOfType(sumCaseColl);
|
||||||
|
|
||||||
|
if (sumCaseColl && sumCaseColl->isEnsemble()) continue;
|
||||||
|
;
|
||||||
|
|
||||||
|
cases.push_back(sumCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
return cases;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -106,6 +106,8 @@ private:
|
|||||||
const QVariant& newValue,
|
const QVariant& newValue,
|
||||||
RifEclipseSummaryAddress* adr);
|
RifEclipseSummaryAddress* adr);
|
||||||
|
|
||||||
|
static std::vector<RimSummaryCase*> summaryCasesForSourceStepping();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
||||||
caf::PdmPtrField<RimSummaryCaseCollection*> m_ensemble;
|
caf::PdmPtrField<RimSummaryCaseCollection*> m_ensemble;
|
||||||
|
Loading…
Reference in New Issue
Block a user