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

@@ -28,6 +28,7 @@
#include "RimSummaryMultiPlot.h"
#include "RimSummaryPlot.h"
#include "cafProgressInfo.h"
#include "cafSelectionManager.h"
#include <QAction>
@@ -43,6 +44,8 @@ void RicAppendSummaryPlotsForSummaryAddressesFeature::appendPlotsForAddresses( R
if ( !summaryMultiPlot ) return;
if ( addresses.empty() ) return;
caf::ProgressInfo info( addresses.size(), "Appending plots..." );
for ( auto adr : addresses )
{
auto* plot = new RimSummaryPlot();
@@ -50,6 +53,8 @@ void RicAppendSummaryPlotsForSummaryAddressesFeature::appendPlotsForAddresses( R
plot->handleDroppedObjects( { adr } );
summaryMultiPlot->addPlot( plot );
info.incrementProgress();
}
}