mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Bugfix: crash when slicing one layer objects with sailfish G-code flavor. Includes regression test. #2335
This commit is contained in:
parent
11bd1e68e2
commit
30b0869595
4 changed files with 22 additions and 4 deletions
|
@ -129,11 +129,14 @@ sub set_acceleration {
|
|||
}
|
||||
|
||||
sub update_progress {
|
||||
my ($self, $percent) = @_;
|
||||
my ($self, $num, $tot, $allow_100) = @_;
|
||||
|
||||
return "" if $self->config->gcode_flavor !~ /^(?:makerware|sailfish)$/;
|
||||
|
||||
my $percent = int($num/$tot*100);
|
||||
$percent = min($percent, 99) if !$allow_100;
|
||||
return sprintf "M73 P%s%s\n",
|
||||
int($percent),
|
||||
$percent,
|
||||
$self->_comment('update progress');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue