mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 04:54:08 -06:00
Workaround for upstream module bug causing command line option parsing for multi-boolean options like retract-layer-change and wipe
This commit is contained in:
parent
5d10ef514f
commit
7041ebdd22
5 changed files with 26 additions and 8 deletions
|
@ -58,9 +58,13 @@ sub new_from_cli {
|
|||
|
||||
my $self = $class->new;
|
||||
foreach my $opt_key (keys %args) {
|
||||
if ($opt_key =~ /^(?:print_center|bed_size|duplicate_grid|extruder_offset|retract_layer_change|wipe)$/) {
|
||||
my $opt_def = $Options->{$opt_key};
|
||||
|
||||
# we use set_deserialize() for bool options since GetOpt::Long doesn't handle
|
||||
# arrays of boolean values
|
||||
if ($opt_key =~ /^(?:print_center|bed_size|duplicate_grid|extruder_offset)$/ || $opt_def->{type} eq 'bool') {
|
||||
$self->set_deserialize($opt_key, $args{$opt_key});
|
||||
} elsif (my $shortcut = $Options->{$opt_key}{shortcut}) {
|
||||
} elsif (my $shortcut = $opt_def->{shortcut}) {
|
||||
$self->set($_, $args{$opt_key}) for @$shortcut;
|
||||
} else {
|
||||
$self->set($opt_key, $args{$opt_key});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue