Make sure we create multiple plots if we import multiple summary cases at once.

This commit is contained in:
jonjenssen 2022-05-27 12:08:39 +02:00 committed by jonjenssen
parent c9aa9285d2
commit 2a57adf222

View File

@ -135,12 +135,16 @@ bool RicImportSummaryCasesFeature::createAndAddSummaryCasesFromFiles( const QStr
addSummaryCases( *cases );
if ( !cases->empty() && doCreateDefaultPlot )
{
auto objectToSelect = RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( { cases->back() }, {} );
if ( objectToSelect )
RimSummaryMultiPlot* plotToSelect = nullptr;
for ( auto sumCase : *cases )
{
RiuPlotMainWindowTools::setExpanded( objectToSelect );
RiuPlotMainWindowTools::selectAsCurrentItem( objectToSelect );
plotToSelect = RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( { sumCase }, {} );
}
if ( plotToSelect )
{
RiuPlotMainWindowTools::setExpanded( plotToSelect );
RiuPlotMainWindowTools::selectAsCurrentItem( plotToSelect );
}
}