Skip to content

Commit

Permalink
Fix progress issue
Browse files Browse the repository at this point in the history
One of the commits from SoftFever/OrcaSlicer#2819 (933aa3050bf5297b3714fb59575b3ec86e017112)
  • Loading branch information
Noisyfox authored and Ocraftyone committed Sep 6, 2024
1 parent f69ec01 commit fb18cd4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Jobs/ArrangeJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ void ArrangeJob::process(Ctl &ctl)
}

// finalize just here.
ctl.update_status(status_range(),
ctl.update_status(100,
ctl.was_canceled() ? _u8L("Arranging canceled.") :
we_have_unpackable_items ? _u8L("Arranging is done but there are unpacked items. Reduce spacing and try again.") : _u8L("Arranging done."));
}
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Jobs/FillBedJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void FillBedJob::process(Ctl &ctl)

params.progressind = [this, &ctl, &statustxt](unsigned st, std::string str="") {
if (st > 0)
ctl.update_status(int(m_status_range - st) * 100 / status_range(), statustxt + " " + str);
ctl.update_status(st * 100 / status_range(), statustxt + " " + str);
};

params.on_packed = [&do_stop] (const ArrangePolygon &ap) {
Expand Down
10 changes: 5 additions & 5 deletions src/slic3r/GUI/Jobs/RotoptimizeJob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ void RotoptimizeJob::prepare()
void RotoptimizeJob::process(Ctl &ctl)
{
int prev_status = 0;
// auto statustxt = _u8L("Searching for optimal orientation");
// ctl.update_status(0, statustxt);
auto statustxt = _u8L("Searching for optimal orientation");
ctl.update_status(0, statustxt);

auto params =
sla::RotOptimizeParams{}
Expand Down Expand Up @@ -79,9 +79,9 @@ void RotoptimizeJob::process(Ctl &ctl)
if (ctl.was_canceled()) break;
}

// ctl.update_status(100, ctl.was_canceled() ?
// _u8L("Orientation search canceled.") :
// _u8L("Orientation found."));
ctl.update_status(100, ctl.was_canceled() ?
_u8L("Orientation search canceled.") :
_u8L("Orientation found."));
}

RotoptimizeJob::RotoptimizeJob() : m_plater{wxGetApp().plater()} { prepare(); }
Expand Down

0 comments on commit fb18cd4

Please sign in to comment.