FIX: auto arranging has stauts report

Jira: STUDIO-305

Change-Id: Ib13ccf4037cd1144177935c1184eaf203aa0eb7f
This commit is contained in:
Arthur 2022-07-22 18:32:10 +08:00 committed by Lane.Wei
parent c1ac1d8cfc
commit ace3c2a231
2 changed files with 6 additions and 7 deletions

View File

@ -558,10 +558,8 @@ void ArrangeJob::process()
params.stopcondition = [this]() { return was_canceled(); }; params.stopcondition = [this]() { return was_canceled(); };
auto count = unsigned(m_selected.size());// + m_unprintable.size()); params.progressind = [this](unsigned num_finished, std::string str="") {
params.progressind = [this, count](unsigned num_finished, std::string str="") { update_status(num_finished, _L("Arranging") + " " + str);
// if (num_finished >= 0 && num_finished <= count)
// update_status(int(float(num_finished) / count * 100), _L("Arranging") + " "+str);
}; };
if(!params.is_seq_print) if(!params.is_seq_print)
@ -610,7 +608,7 @@ void ArrangeJob::process()
} }
// finalize just here. // finalize just here.
update_status(100, update_status(status_range(),
was_canceled() ? _(L("Arranging canceled.")) : was_canceled() ? _(L("Arranging canceled.")) :
we_have_unpackable_items ? _(L("Arranging is done but there are unpacked items. Reduce spacing and try again.")) : _(L("Arranging done."))); we_have_unpackable_items ? _(L("Arranging is done but there are unpacked items. Reduce spacing and try again.")) : _(L("Arranging done.")));
} }

View File

@ -59,7 +59,8 @@ public:
int status_range() const override int status_range() const override
{ {
return int(m_selected.size() + m_unprintable.size()); // ensure finalize() is called after all operations in process() is finished.
return int(m_selected.size() + m_unprintable.size() + 1);
} }
void finalize() override; void finalize() override;