From 4a46f09d315f71bc1d4f8d68aafca25662e73370 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%. Closes #1728. --- 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 df8b3f9e8..a5371d2cc 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); + } }); });