Fixed regression causing per-volume settings to be ignored upon background recalculation. #2277

This commit is contained in:
Alessandro Ranellucci 2014-11-07 20:14:02 +01:00
parent 59f0c64e1c
commit 12ba7201c0

View File

@ -92,10 +92,10 @@ sub apply_config {
my $volume = $object->model_object->volumes->[$volume_id]; my $volume = $object->model_object->volumes->[$volume_id];
my $new = $self->default_region_config->clone; my $new = $self->default_region_config->clone;
{ foreach my $other_config ($object->model_object->config, $volume->config) {
my $model_object_config = $object->model_object->config->clone; my $other_config = $other_config->clone;
$model_object_config->normalize; $other_config->normalize;
$new->apply_dynamic($model_object_config); $new->apply_dynamic($other_config);
} }
if ($volume->material_id ne '') { if ($volume->material_id ne '') {
my $material_config = $object->model_object->model->get_material($volume->material_id)->config->clone; my $material_config = $object->model_object->model->get_material($volume->material_id)->config->clone;
@ -179,10 +179,12 @@ sub add_model_object {
my $config = Slic3r::Config::PrintRegion->new; my $config = Slic3r::Config::PrintRegion->new;
$config->apply($self->default_region_config); $config->apply($self->default_region_config);
# override the defaults with per-object config and then with per-material and per-volume configs # override the defaults with per-object config and then with per-volume and per-material configs
$config->apply_dynamic($object_config); foreach my $other_config ($object_config, $volume->config) {
$config->apply_dynamic($volume->config); my $other_config = $other_config->clone;
$other_config->normalize;
$config->apply_dynamic($other_config);
}
if ($volume->material_id ne '') { if ($volume->material_id ne '') {
my $material_config = $volume->material->config->clone; my $material_config = $volume->material->config->clone;
$material_config->normalize; $material_config->normalize;