Fix of Post processing scripst not working:

https://github.com/alexrj/Slic3r/issues/3698

This is really a patch as it does not let the user to use the semicolon
inside a script invocation line.
This commit is contained in:
bubnikv 2017-02-08 10:35:21 +01:00
parent e7718b385f
commit 6b1a72aac9

View file

@ -413,8 +413,11 @@ sub _get_config_value {
my ($self, $opt_key, $opt_index, $deserialize) = @_;
if ($deserialize) {
# Want to edit a vector value (currently only multi-strings) in a single edit box.
# Aggregate the strings the old way.
# Currently used for the post_process config value only.
die "Can't deserialize option indexed value" if $opt_index != -1;
return $self->config->serialize($opt_key);
return join(';', @{$self->config->get($opt_key)});
} else {
return $opt_index == -1
? $self->config->get($opt_key)
@ -433,7 +436,10 @@ sub _on_change {
my $field_value = $self->get_value($opt_id);
if ($option->gui_flags =~ /\bserialized\b/) {
die "Can't set serialized option indexed value" if $opt_index != -1;
$self->config->set_deserialize($opt_key, $field_value);
# Split a string to multiple strings by a semi-colon. This is the old way of storing multi-string values.
# Currently used for the post_process config value only.
my @values = split /;/, $field_value;
$self->config->set($opt_key, \@values);
} else {
if ($opt_index == -1) {
$self->config->set($opt_key, $field_value);