Guard against missing well results

When project file has settings for wells but there are no well results
p4#: 20416
This commit is contained in:
Jacob Støren
2013-02-07 13:44:18 +01:00
parent 9f8f39b80b
commit 09544f082b
5 changed files with 35 additions and 10 deletions

View File

@@ -314,11 +314,14 @@ void ProgressInfoStatic::setProgress(size_t progressValue)
progressStack().back() = progressValue;
progressSpanStack().back() = 1;
assert(static_cast<int>(currentTotalProgress()) <= progressDialog()->maximum());
size_t totProg = currentTotalProgress();
int totalProgress = static_cast<int>(currentTotalProgress());
int totalMaxProgress = static_cast<int>(currentTotalMaxProgressValue());
assert(static_cast<int>(totalProgress) <= totalMaxProgress);
progressDialog()->setMaximum(totalMaxProgress);
progressDialog()->setValue(totalProgress);
progressDialog()->setMaximum(static_cast<int>(currentTotalMaxProgressValue()));
progressDialog()->setValue(static_cast<int>(currentTotalProgress()));
QCoreApplication::processEvents();
}