#1895 Curve creator. Filter curves by selecting summary category/categories

This commit is contained in:
Bjørn Erik Jensen
2017-09-20 11:42:56 +02:00
parent dd8549d3d1
commit b430982b2f

View File

@@ -333,6 +333,7 @@ void RicSummaryCurveCreator::fieldChangedByUi(const caf::PdmFieldHandle* changed
// Lookup item type input field
auto identifierAndField = lookupIdentifierAndFieldFromFieldHandle(changedField);
if (changedField == &m_selectedCases ||
changedField == &m_selectedSummaryCategories ||
identifierAndField != nullptr)
{
loadDataAndUpdatePlot();
@@ -785,10 +786,11 @@ bool RicSummaryCurveCreator::isAddressCompatibleWithControllingFieldSelection(co
std::set<RifEclipseSummaryAddress> RicSummaryCurveCreator::buildAddressListFromSelections()
{
std::set<RifEclipseSummaryAddress> addressSet;
for (const auto& identifierAndFieldList : m_identifierFieldsMap)
for (const auto& category : m_selectedSummaryCategories())
{
auto identifierAndFieldList = m_identifierFieldsMap[category];
std::vector<std::pair<RifEclipseSummaryAddress::SummaryIdentifierType, QString>> selectionStack;
buildAddressListForCategoryRecursively(identifierAndFieldList.first, identifierAndFieldList.second.begin(), addressSet, selectionStack);
buildAddressListForCategoryRecursively(category, identifierAndFieldList.begin(), addressSet, selectionStack);
}
return addressSet;
}