Progress: optionally call QApplication::processEvents on progress updates

Add ProgressInfoEventProcessingBlocker

Co-authored-by: Kristian Bendiksen kristian.bendiksen@gmail.com
This commit is contained in:
Magne Sjaastad
2024-09-11 11:01:25 +02:00
parent a3a740b722
commit 9e41db33f5
4 changed files with 42 additions and 15 deletions

View File

@@ -80,9 +80,10 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
{
std::vector<RiuWellImportWizard::WellInfo> importedWells = wellImportwizard.importedWells();
caf::ProgressInfo progress( importedWells.size(), "Importing wells from OSDU", false, true );
int colorIndex = 0;
std::vector<RimOsduWellPath*> newWells;
caf::ProgressInfoEventProcessingBlocker blocker;
caf::ProgressInfo progress( importedWells.size(), "Importing wells from OSDU", false, true );
int colorIndex = 0;
std::vector<RimOsduWellPath*> newWells;
for ( const auto& w : importedWells )
{
auto wellPath = new RimOsduWellPath;

View File

@@ -174,6 +174,7 @@ bool RimWellPathCollection::loadDataAndUpdate()
return count;
};
caf::ProgressInfoEventProcessingBlocker blocker;
caf::ProgressInfo progress( allWellPaths().size() + countWellLogs( allWellPaths() ) + 2, "Reading well paths from file", false, true );
readWellPathFormationFiles();