mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-12 08:52:46 +02:00
Bugfix: crash when slicing one layer objects with sailfish G-code flavor. Includes regression test. #2335
This commit is contained in:
1 parent
11bd1e68e2
commit
30b0869595
4 files changed
+22
-4
No files matched your search
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user