Avoid issue with invisible status indication.

This commit is contained in:
tamasmeszaros 2021-12-01 12:47:14 +01:00
parent 3be7d5f0dc
commit 17f4b1bea3
8 changed files with 57 additions and 31 deletions

View file

@ -105,7 +105,9 @@ void FillBedJob::prepare()
void FillBedJob::process(Ctl &ctl)
{
ctl.call_on_main_thread([this]{ prepare(); }).wait();
auto statustxt = _u8L("Filling bed");
ctl.call_on_main_thread([this] { prepare(); }).wait();
ctl.update_status(0, statustxt);
if (m_object_idx == -1 || m_selected.empty()) return;
@ -121,10 +123,6 @@ void FillBedJob::process(Ctl &ctl)
return ctl.was_canceled() || do_stop;
};
auto statustxt = _u8L("Filling bed");
ctl.update_status(0, statustxt);
params.progressind = [this, &ctl, &statustxt](unsigned st) {
if (st > 0)
ctl.update_status(int(m_status_range - st) * 100 / status_range(), statustxt);