Show progress bar when appending plots to multiplot (#8976)

* Show progress bar when appending plots to multiplot
* Stop plot manager from going crazy creating plots when filter text is blank
* Speed up plot manager create plot
This commit is contained in:
jonjenssen
2022-05-30 11:39:05 +02:00
committed by GitHub
parent 17f169e513
commit db589c7e32
6 changed files with 44 additions and 23 deletions

View File

@@ -382,6 +382,8 @@ void RimSummaryPlotManager::replaceCurves()
//--------------------------------------------------------------------------------------------------
void RimSummaryPlotManager::createNewPlot()
{
if ( m_filterText().trimmed().isEmpty() ) return;
std::vector<RimSummaryCase*> summaryCases;
std::vector<RimSummaryCaseCollection*> ensembles;
findFilteredSummaryCasesAndEnsembles( summaryCases, ensembles );
@@ -400,24 +402,8 @@ void RimSummaryPlotManager::createNewPlot()
auto plots = plotBuilder.createPlots();
if ( m_createMultiPlot )
{
{
auto summaryPlots = plotBuilder.createPlots();
RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( summaryPlots );
}
bool createStandardMultiPlot = false;
if ( createStandardMultiPlot )
{
// Code to generate a standard multi plot
std::vector<RimPlot*> plotsForMultiPlot;
for ( auto p : plots )
{
p->loadDataAndUpdate();
plotsForMultiPlot.push_back( dynamic_cast<RimPlot*>( p ) );
}
RicSummaryPlotBuilder::createAndAppendMultiPlot( plotsForMultiPlot );
}
auto summaryPlots = plotBuilder.createPlots();
RicSummaryPlotBuilder::createAndAppendSummaryMultiPlot( summaryPlots );
}
else
{