Unite cancel callback and status function

This commit is contained in:
tamasmeszaros 2021-03-18 09:37:46 +01:00
parent de8bb00fa9
commit 46fd722f3c
3 changed files with 20 additions and 18 deletions

View file

@ -21,13 +21,12 @@ void RotoptimizeJob::process()
if (!o || !po) return;
Vec2d r = sla::find_best_rotation(*po, 0.75f,
[this](unsigned s) {
if (s < 100)
update_status(int(s), _(L("Searching for optimal orientation")));
},
[this] () { return was_canceled(); });
Vec2d r = sla::find_best_rotation(*po, 0.75f, [this](int s) {
if (s > 0 && s < 100)
update_status(s, _(L("Searching for optimal orientation")));
return !was_canceled();
});
double mindist = 6.0; // FIXME