mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1815 Curve creator. Fix bug related to observed data summaries
This commit is contained in:
parent
1326912b7c
commit
89bc438921
@ -427,10 +427,10 @@ QList<caf::PdmOptionItemInfo> RicSummaryCurveCreator::calculateValueOptions(cons
|
|||||||
findPossibleSummaryAddressesFromSelectedObservedData(identifierAndField) : std::set<RifEclipseSummaryAddress>();
|
findPossibleSummaryAddressesFromSelectedObservedData(identifierAndField) : std::set<RifEclipseSummaryAddress>();
|
||||||
|
|
||||||
auto pdmField = identifierAndField->pdmField();
|
auto pdmField = identifierAndField->pdmField();
|
||||||
std::set<QString> itemNames;
|
|
||||||
|
|
||||||
for(int i = 0; i < 2; i++)
|
for(int i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
|
std::set<QString> itemNames;
|
||||||
for (const auto& address : addrUnion[i])
|
for (const auto& address : addrUnion[i])
|
||||||
{
|
{
|
||||||
auto name = QString::fromStdString(address.uiText(identifierAndField->summaryIdentifier()));
|
auto name = QString::fromStdString(address.uiText(identifierAndField->summaryIdentifier()));
|
||||||
@ -439,8 +439,8 @@ QList<caf::PdmOptionItemInfo> RicSummaryCurveCreator::calculateValueOptions(cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create headers only when observed data is selected
|
// Create headers only when observed data is selected
|
||||||
bool createHeaders = addrUnion[OBS_DATA].size() > 0;
|
bool hasObservedData = addrUnion[OBS_DATA].size() > 0;
|
||||||
if (createHeaders)
|
if (hasObservedData)
|
||||||
{
|
{
|
||||||
auto headerText = i == SUM_CASES ? QString("Simulated Data") : QString("Observed Data");
|
auto headerText = i == SUM_CASES ? QString("Simulated Data") : QString("Observed Data");
|
||||||
options.push_back(caf::PdmOptionItemInfo::createHeader(headerText, true));
|
options.push_back(caf::PdmOptionItemInfo::createHeader(headerText, true));
|
||||||
@ -448,12 +448,12 @@ QList<caf::PdmOptionItemInfo> RicSummaryCurveCreator::calculateValueOptions(cons
|
|||||||
for (const auto& iName : itemNames)
|
for (const auto& iName : itemNames)
|
||||||
{
|
{
|
||||||
auto optionItem = caf::PdmOptionItemInfo(iName, iName);
|
auto optionItem = caf::PdmOptionItemInfo(iName, iName);
|
||||||
if (createHeaders)
|
if (hasObservedData)
|
||||||
optionItem.setLevel(1);
|
optionItem.setLevel(1);
|
||||||
options.push_back(optionItem);
|
options.push_back(optionItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!includeObservedData) break;
|
if (!hasObservedData) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user