changeset 517:77b4ce536d8f

* print Done when done
author Chris Cannam
date Thu, 11 Dec 2008 11:30:15 +0000
parents 5ab561f664f2
children 3cea770c6632
files base/ProgressPrinter.cpp
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/base/ProgressPrinter.cpp	Thu Dec 11 11:04:01 2008 +0000
+++ b/base/ProgressPrinter.cpp	Thu Dec 11 11:30:15 2008 +0000
@@ -54,23 +54,23 @@
 void
 ProgressPrinter::done()
 {
-    setProgress(100);
+    std::cerr << "\r"
+              << m_prefix.toStdString() 
+              << (m_prefix == "" ? "" : " ")
+              << "Done" << std::endl;
 }
 
 void
 ProgressPrinter::setProgress(int progress)
 {
     if (progress == m_lastProgress) return;
-    if (progress == 100) std::cerr << "\r\n";
-    else {
-        std::cerr << "\r"
-                  << m_prefix.toStdString() 
-                  << (m_prefix == "" ? "" : " ");
-        if (m_definite) {
-            std::cerr << progress << "%";
-        } else {
-            std::cerr << "|/-\\"[progress % 4];
-        }
+    std::cerr << "\r"
+              << m_prefix.toStdString() 
+              << (m_prefix == "" ? "" : " ");
+    if (m_definite) {
+        std::cerr << progress << "%";
+    } else {
+        std::cerr << "|/-\\"[progress % 4];
     }
     m_lastProgress = progress;
 }