Supports were printed twice if synchronized with object layers, added always-on settings in ObjectSettingDialog

This commit is contained in:
Lukas Matena 2018-07-10 13:02:43 +02:00
parent 4c823b840f
commit e44480d61f
2 changed files with 16 additions and 3 deletions

View File

@ -323,6 +323,12 @@ sub selection_changed {
# get default values
my $default_config = Slic3r::Config::new_from_defaults_keys(\@opt_keys);
# decide which settings will be shown by default
if ($itemData->{type} eq 'object') {
$config->set_ifndef('wipe_into_objects', 0);
$config->set_ifndef('wipe_into_infill', 0);
}
# append default extruder
push @opt_keys, 'extruder';
$default_config->set('extruder', 0);
@ -330,7 +336,14 @@ sub selection_changed {
$self->{settings_panel}->set_default_config($default_config);
$self->{settings_panel}->set_config($config);
$self->{settings_panel}->set_opt_keys(\@opt_keys);
# disable minus icon to remove the settings
if ($itemData->{type} eq 'object') {
$self->{settings_panel}->set_fixed_options([qw(extruder), qw(wipe_into_infill), qw(wipe_into_objects)]);
} else {
$self->{settings_panel}->set_fixed_options([qw(extruder)]);
}
$self->{settings_panel}->enable;
}

View File

@ -1365,7 +1365,7 @@ void GCode::process_layer(
m_avoid_crossing_perimeters.use_external_mp_once = true;
m_last_obj_copy = this_object_copy;
this->set_origin(unscale(copy.x), unscale(copy.y));
if (object_by_extruder.support != nullptr) {
if (object_by_extruder.support != nullptr && !print_wipe_extrusions) {
m_layer = layers[layer_id].support_layer;
gcode += this->extrude_support(
// support_extrusion_role is erSupportMaterial, erSupportMaterialInterface or erMixed for all extrusion paths.