Fix regression in Config->setenv affecting post-processing scripts. Includes regression test
This commit is contained in:
parent
bba69ed22f
commit
634ccb33ab
@ -171,7 +171,7 @@ sub save {
|
||||
sub setenv {
|
||||
my $self = shift;
|
||||
|
||||
foreach my $opt_key (sort keys %$Options) {
|
||||
foreach my $opt_key (@{$self->get_keys}) {
|
||||
$ENV{"SLIC3R_" . uc $opt_key} = $self->serialize($opt_key);
|
||||
}
|
||||
}
|
||||
|
20
t/config.t
Normal file
20
t/config.t
Normal file
@ -0,0 +1,20 @@
|
||||
use Test::More tests => 1;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
BEGIN {
|
||||
use FindBin;
|
||||
use lib "$FindBin::Bin/../lib";
|
||||
}
|
||||
|
||||
use Slic3r;
|
||||
use Slic3r::Test;
|
||||
|
||||
{
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
$config->set('layer_height', 0.123);
|
||||
$config->setenv;
|
||||
is $ENV{SLIC3R_LAYER_HEIGHT}, '0.123', 'setenv';
|
||||
}
|
||||
|
||||
__END__
|
Loading…
Reference in New Issue
Block a user