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 + +