From 6de340e39a473729830ec846c44986787884bc34 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 2 Nov 2018 22:39:22 -0500 Subject: [PATCH] Adding new line upon progress bar completion. --- src/progress_bar.cpp | 3 ++- tests/regression_tests/plot/plots.xml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/progress_bar.cpp b/src/progress_bar.cpp index 44a7e24963..8518c10fa9 100644 --- a/src/progress_bar.cpp +++ b/src/progress_bar.cpp @@ -60,7 +60,8 @@ ProgressBar::set_value(double val) { // write the bar std::cout << '\r' << bar << std::flush; - + if (val >= 100.0) { std::cout << "\n"; } + // reset the bar value bar = ""; } diff --git a/tests/regression_tests/plot/plots.xml b/tests/regression_tests/plot/plots.xml index ecfe69125b..84c3f46c66 100644 --- a/tests/regression_tests/plot/plots.xml +++ b/tests/regression_tests/plot/plots.xml @@ -29,4 +29,10 @@ 20 20 10 + + 100 100 10 + 0. 0. 0. + 20 20 10 + +