From 528595c7f7d478e73c1d6d65c75681449bcb3265 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 31 Jul 2013 20:42:24 +0200 Subject: [PATCH] Automatically ignore per-role extruders if they're not configured in Printer Settings (only in GUI expert mode) - CLI mode continues to autogenerate extruder settings. #1236 --- lib/Slic3r/GUI/SkeinPanel.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Slic3r/GUI/SkeinPanel.pm b/lib/Slic3r/GUI/SkeinPanel.pm index 5f0054374..a76137f82 100644 --- a/lib/Slic3r/GUI/SkeinPanel.pm +++ b/lib/Slic3r/GUI/SkeinPanel.pm @@ -4,6 +4,7 @@ use warnings; use utf8; use File::Basename qw(basename dirname); +use List::Util qw(min); use Slic3r::Geometry qw(X Y); use Wx qw(:dialog :filedialog :font :icon :id :misc :notebook :panel :sizer); use Wx::Event qw(EVT_BUTTON); @@ -404,6 +405,10 @@ sub config { $config->set('first_layer_height', $config->nozzle_diameter->[0]); $config->set('avoid_crossing_perimeters', 1); $config->set('infill_every_layers', 10); + } else { + my $extruders_count = $self->{options_tabs}{printer}{extruders_count}; + $config->set("${_}_extruder", min($config->get("${_}_extruder"), $extruders_count)) + for qw(perimeter infill support_material support_material_interface); } return $config;