From d198dc8537cde3beb9d4eea7f626a1bb8b770610 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 24 Aug 2023 10:04:28 +0200 Subject: [PATCH] Summary Plot Manager: Add missing calculateValueOptions This dialog was designed to be used efficiently from keyboard. By default, all filtered addresses are selected. To select a subset using the text filter, all addresses need to be unchecked before typing a text string in the filter text input. --- .../Summary/RimSummaryPlotManager.cpp | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotManager.cpp b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotManager.cpp index e8501c624c..fd37ef95f0 100644 --- a/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotManager.cpp +++ b/ApplicationLibCode/ProjectDataModel/Summary/RimSummaryPlotManager.cpp @@ -210,6 +210,16 @@ QList RimSummaryPlotManager::calculateValueOptions( cons updateSelectionFromUiChange(); } + else if ( fieldNeedingOptions == &m_addressCandidates ) + { + auto addresses = filteredAddresses(); + + for ( const auto& adr : addresses ) + { + QString text = QString::fromStdString( adr.uiText() ); + options.push_back( caf::PdmOptionItemInfo( text, text ) ); + } + } return options; } @@ -384,7 +394,19 @@ void RimSummaryPlotManager::createNewPlot() std::vector ensembles; findFilteredSummaryCasesAndEnsembles( summaryCases, ensembles ); - std::set filteredAddressesFromSource = filteredAddresses(); + std::set filteredAddressesFromSource; + + for ( const auto& adr : filteredAddresses() ) + { + for ( const auto& textSelection : m_addressCandidates() ) + { + if ( adr.uiText() == textSelection.toStdString() ) + { + filteredAddressesFromSource.insert( adr ); + continue; + } + } + } RicSummaryPlotBuilder plotBuilder; plotBuilder.setAddresses( filteredAddressesFromSource );