working C++ status bar.

Signed-off-by: tamasmeszaros <meszaros.q@gmail.com>
This commit is contained in:
tamasmeszaros 2018-08-30 11:40:06 +02:00
parent 9e2d48ff3b
commit 15ad0ef2f2
12 changed files with 75 additions and 201 deletions

View file

@ -305,6 +305,10 @@ void AppController::arrange_model()
// Set the range of the progress to the object count
pind->max(count);
pind->on_cancel([](){
std::cout << "Cannot be cancelled!" << std::endl;
});
}
auto dist = print_ctl()->config().min_object_distance();
@ -353,7 +357,7 @@ void AppController::arrange_model()
bed,
arr::BOX,
false, // create many piles not just one pile
[pind, count](unsigned rem) {
[this, pind, count](unsigned rem) {
if(pind)
pind->update(count - rem, _(L("Arranging objects...")));
});
@ -369,6 +373,7 @@ void AppController::arrange_model()
if(pind) {
pind->max(pmax);
pind->update(0, _(L("Arranging done.")));
pind->on_cancel(/*remove cancel function*/);
}
}