mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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.
This commit is contained in:
parent
58e35bdbec
commit
d198dc8537
@ -210,6 +210,16 @@ QList<caf::PdmOptionItemInfo> 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<RimSummaryCaseCollection*> ensembles;
|
||||
findFilteredSummaryCasesAndEnsembles( summaryCases, ensembles );
|
||||
|
||||
std::set<RifEclipseSummaryAddress> filteredAddressesFromSource = filteredAddresses();
|
||||
std::set<RifEclipseSummaryAddress> 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 );
|
||||
|
Loading…
Reference in New Issue
Block a user