mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 04:31:17 -07:00
Use istringstream for deserializing config options in order to use the correct locale. #2187
This commit is contained in:
parent
b10917806a
commit
d9f6b0933b
2 changed files with 30 additions and 36 deletions
|
|
@ -4,7 +4,7 @@ use strict;
|
|||
use warnings;
|
||||
|
||||
use Slic3r::XS;
|
||||
use Test::More tests => 103;
|
||||
use Test::More tests => 105;
|
||||
|
||||
foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
|
||||
$config->set('layer_height', 0.3);
|
||||
|
|
@ -63,6 +63,8 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Full->new) {
|
|||
is $config->serialize('extruder_offset'), '10x20,30x45', 'serialize points';
|
||||
$config->set_deserialize('extruder_offset', '20x10');
|
||||
is_deeply $config->get('extruder_offset'), [[20,10]], 'deserialize points';
|
||||
$config->set_deserialize('extruder_offset', '0x0');
|
||||
is_deeply $config->get('extruder_offset'), [[0,0]], 'deserialize points';
|
||||
{
|
||||
my @values = ([10,20]);
|
||||
$values[2] = [10,20]; # implicitely extend array; this is not the same as explicitely assigning undef to second item
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue