diff --git a/src/Gui/ProgressBar.cpp b/src/Gui/ProgressBar.cpp index fcaff6adb5bb..9225d24bf314 100644 --- a/src/Gui/ProgressBar.cpp +++ b/src/Gui/ProgressBar.cpp @@ -226,7 +226,15 @@ void SequencerBar::nextStep(bool canAbort) void SequencerBar::setProgress(size_t step) { - d->bar->show(); + QThread* currentThread = QThread::currentThread(); + QThread* thr = d->bar->thread(); // this is the main thread + if (thr != currentThread) { + QMetaObject::invokeMethod(d->bar, "show", Qt::QueuedConnection); + } + else { + d->bar->show(); + } + setValue((int)step); } diff --git a/src/Gui/ProgressDialog.cpp b/src/Gui/ProgressDialog.cpp index 519ad2e72e68..81cec7571240 100644 --- a/src/Gui/ProgressDialog.cpp +++ b/src/Gui/ProgressDialog.cpp @@ -152,7 +152,15 @@ void SequencerDialog::nextStep(bool canAbort) void SequencerDialog::setProgress(size_t step) { - d->dlg->show(); + QThread* currentThread = QThread::currentThread(); + QThread* thr = d->dlg->thread(); // this is the main thread + if (thr != currentThread) { + QMetaObject::invokeMethod(d->dlg, "show", Qt::QueuedConnection); + } + else { + d->dlg->show(); + } + setValue((int)step); }