mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 08:25:56 +08:00
Gracefully transform support_material_threshold = 0 into the default value instead of emitting an error. #3837
This commit is contained in:
parent
1806664686
commit
6382af2b65
@ -269,12 +269,6 @@ sub validate {
|
|||||||
qw(perimeter infill solid_infill top_infill support_material first_layer);
|
qw(perimeter infill solid_infill top_infill support_material first_layer);
|
||||||
}
|
}
|
||||||
|
|
||||||
# support material
|
|
||||||
if ($self->support_material) {
|
|
||||||
die "Value of 0 is illegal. Use some % value instead (e.g. 150%) for auto.\n"
|
|
||||||
if $self->support_material_threshold =~ /^0+/;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
# general validation, quick and dirty
|
# general validation, quick and dirty
|
||||||
foreach my $opt_key (@{$self->get_keys}) {
|
foreach my $opt_key (@{$self->get_keys}) {
|
||||||
|
@ -1705,6 +1705,10 @@ PrintConfigBase::_handle_legacy(t_config_option_key &opt_key, std::string &value
|
|||||||
values is a dirty hack and will need to be removed sometime in the future, but it
|
values is a dirty hack and will need to be removed sometime in the future, but it
|
||||||
will avoid lots of complaints for now. */
|
will avoid lots of complaints for now. */
|
||||||
value = "0";
|
value = "0";
|
||||||
|
} else if (opt_key == "support_material_threshold" && value == "0") {
|
||||||
|
// 0 used to be automatic threshold, but we introduced percent values so let's
|
||||||
|
// transform it into the default value
|
||||||
|
value = "60%";
|
||||||
}
|
}
|
||||||
|
|
||||||
// cemetery of old config settings
|
// cemetery of old config settings
|
||||||
|
Loading…
x
Reference in New Issue
Block a user