mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-05 02:30:44 +00:00
Fix problem that could cause CProgressBar to hang and not close
This commit is contained in:
parent
a8dc05c3f5
commit
36acc7bd2f
@ -55,6 +55,9 @@ void CProgressBar::add (long count) {
|
||||
|
||||
// See if timer limit has passed
|
||||
if (!progress && !timeChecked && (timer.elapsed() > timerLimit)) {
|
||||
maxSteps -= numDone; // maxSteps now is number of steps remaining
|
||||
numDone = 1; // and we figure only one processed so far
|
||||
|
||||
progress = new QProgressDialog(savedTitle,
|
||||
QString(), 0, maxSteps, parent,
|
||||
Qt::WindowSystemMenuHint | Qt::WindowTitleHint);
|
||||
@ -62,8 +65,7 @@ void CProgressBar::add (long count) {
|
||||
progress->setValue(0);
|
||||
progress->setMinimumWidth(width);
|
||||
progress->show();
|
||||
maxSteps -= numDone; // maxSteps now is number of steps remaining
|
||||
numDone = 1; // and we figure only one processed so far
|
||||
|
||||
QCoreApplication::processEvents();
|
||||
showProgress = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user