mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1969 Curve Calculator : Include missing handling of observed data postfix
This commit is contained in:
parent
c2b543b375
commit
069d5ddf3b
@ -256,15 +256,22 @@ void RiuSummaryCurveDefSelection::setSelectedCurveDefinitions(const std::vector<
|
|||||||
m_selectedCases.push_back(summaryCase);
|
m_selectedCases.push_back(summaryCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isObservedDataCase = isObservedData(summaryCase);
|
||||||
|
|
||||||
auto identifierAndFieldList = m_identifierFieldsMap[summaryAddress.category()];
|
auto identifierAndFieldList = m_identifierFieldsMap[summaryAddress.category()];
|
||||||
for (const auto& identifierAndField : identifierAndFieldList)
|
for (const auto& identifierAndField : identifierAndFieldList)
|
||||||
{
|
{
|
||||||
QString uiText = QString::fromStdString(summaryAddress.uiText(identifierAndField->summaryIdentifier()));
|
bool isVectorField = identifierAndField->summaryIdentifier() == RifEclipseSummaryAddress::INPUT_VECTOR_NAME;
|
||||||
|
QString avalue = QString::fromStdString(summaryAddress.uiText(identifierAndField->summaryIdentifier()));
|
||||||
|
if (isVectorField && isObservedDataCase)
|
||||||
|
{
|
||||||
|
avalue = avalue + QString(OBSERVED_DATA_AVALUE_POSTFIX);
|
||||||
|
}
|
||||||
const auto& currentSelectionVector = identifierAndField->pdmField()->v();
|
const auto& currentSelectionVector = identifierAndField->pdmField()->v();
|
||||||
if (std::find(currentSelectionVector.begin(), currentSelectionVector.end(), uiText) == currentSelectionVector.end())
|
if (std::find(currentSelectionVector.begin(), currentSelectionVector.end(), avalue) == currentSelectionVector.end())
|
||||||
{
|
{
|
||||||
std::vector<QString> newSelectionVector(currentSelectionVector.begin(), currentSelectionVector.end());
|
std::vector<QString> newSelectionVector(currentSelectionVector.begin(), currentSelectionVector.end());
|
||||||
newSelectionVector.push_back(uiText);
|
newSelectionVector.push_back(avalue);
|
||||||
(*identifierAndField->pdmField()) = newSelectionVector;
|
(*identifierAndField->pdmField()) = newSelectionVector;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user