From debc0868e12677cb11ae540aa109ceef0225b845 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 27 Mar 2014 19:17:24 -0700 Subject: [PATCH] Force the final progress of operations to 100% --- src/dialog_progress.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dialog_progress.cpp b/src/dialog_progress.cpp index 7ccfbc23c..69cbac280 100644 --- a/src/dialog_progress.cpp +++ b/src/dialog_progress.cpp @@ -170,11 +170,14 @@ void DialogProgress::Run(std::function task, int prior // so the user can read the debug output and switch the cancel button to a // close button bool cancelled = this->ps->IsCancelled(); - if (cancelled || (log_output->IsEmpty() && !pending_log)) + if (cancelled || (log_output->IsEmpty() && !pending_log)) { + set_taskbar_progress(0); EndModal(!cancelled); - else + } + else { cancel_button->SetLabelText(_("Close")); - set_taskbar_progress(0); + SetProgress(300); + } }); });