Skip to content

Commit

Permalink
#2775 Add progress when loading summary cases
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobStoren committed Apr 20, 2018
1 parent 4d15956 commit 48814e3
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "RimSummaryCaseCollection.h"

#include <QDir>
#include "cafProgressInfo.h"


CAF_PDM_SOURCE_INIT(RimSummaryCaseMainCollection,"SummaryCaseCollection");
Expand Down Expand Up @@ -295,13 +296,19 @@ std::vector<RimSummaryCaseCollection*> RimSummaryCaseMainCollection::summaryCase
//--------------------------------------------------------------------------------------------------
void RimSummaryCaseMainCollection::loadAllSummaryCaseData()
{
for (RimSummaryCase* sumCase : allSummaryCases())
std::vector<RimSummaryCase*> sumCases = allSummaryCases();

caf::ProgressInfo progInfo(sumCases.size(), "Loading Summary Cases");

for (size_t cIdx = 0; cIdx < sumCases.size(); ++cIdx)
{
RimSummaryCase* sumCase = sumCases[cIdx];
if (sumCase)
{
sumCase->createSummaryReaderInterface();
addCaseRealizationParametersIfFound(*sumCase, sumCase->summaryHeaderFilename());
}
progInfo.incrementProgress();
}
}

Expand Down

0 comments on commit 48814e3

Please sign in to comment.