mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user