From c628fcd5f4fb25fa97d637d9b97eb8472a4788db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacob=20St=C3=B8ren?= Date: Tue, 13 Aug 2019 15:35:14 +0200 Subject: [PATCH] Added warnings when a summary vector filter is not matching any vectors in a case. --- .../RicSummaryPlotFeatureImpl.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.cpp b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.cpp index 66eb51e036..5796d0c536 100644 --- a/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.cpp +++ b/ApplicationCode/Commands/SummaryPlotCommands/RicSummaryPlotFeatureImpl.cpp @@ -262,18 +262,30 @@ std::vector RicSummaryPlotFeatureImpl::addCurvesFromAddressFil const std::set& addrs = summaryCase->summaryReader()->allResultAddresses(); std::vector curveAddressesToUse; + int curveFilterCount = curveFilters.size(); + + std::vector usedFilters(curveFilterCount, false); for (const auto & addr : addrs) { - for (const QString& filter: curveFilters) + for (int cfIdx = 0 ; cfIdx < curveFilterCount ; ++cfIdx) { - if ( addr.isUiTextMatchingFilterText(filter) ) + if ( addr.isUiTextMatchingFilterText( curveFilters[cfIdx]) ) { curveAddressesToUse.push_back(addr); + usedFilters[cfIdx] = true; } } } + for (int cfIdx = 0 ; cfIdx < curveFilterCount ; ++cfIdx) + { + if (!usedFilters[cfIdx]) + { + RiaLogging::warning("Vector filter \"" + curveFilters[cfIdx] + "\" did not match anything in case: \"" + summaryCase->caseName() + "\""); + } + } + if (addHistoryCurves) { std::vector historyAddressesToUse;