mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
working C++ status bar.
Signed-off-by: tamasmeszaros <meszaros.q@gmail.com>
This commit is contained in:
parent
9e2d48ff3b
commit
15ad0ef2f2
12 changed files with 75 additions and 201 deletions
|
@ -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*/);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue