Browse Source

Bugfix: --top-solid-layers was ignored. #769

Alessandro Ranellucci 12 years ago
parent
commit
2796041a6c
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lib/Slic3r/Print/Object.pm

+ 3 - 1
lib/Slic3r/Print/Object.pm

@@ -344,7 +344,9 @@ sub discover_horizontal_shells {
                 Slic3r::debugf "Layer %d has %d surfaces of type '%s'\n",
                 Slic3r::debugf "Layer %d has %d surfaces of type '%s'\n",
                     $i, scalar(@surfaces), ($type == S_TYPE_TOP ? 'top' : 'bottom');
                     $i, scalar(@surfaces), ($type == S_TYPE_TOP ? 'top' : 'bottom');
                 
                 
-                my $solid_layers = S_TYPE_TOP ? $Slic3r::Config->top_solid_layers : $Slic3r::Config->bottom_solid_layers;
+                my $solid_layers = ($type == S_TYPE_TOP)
+                    ? $Slic3r::Config->top_solid_layers
+                    : $Slic3r::Config->bottom_solid_layers;
                 for (my $n = $type == S_TYPE_TOP ? $i-1 : $i+1; 
                 for (my $n = $type == S_TYPE_TOP ? $i-1 : $i+1; 
                         abs($n - $i) <= $solid_layers-1; 
                         abs($n - $i) <= $solid_layers-1; 
                         $type == S_TYPE_TOP ? $n-- : $n++) {
                         $type == S_TYPE_TOP ? $n-- : $n++) {