Bugfix: spiral vase checkbox couldn't be disabled under some circumstances

This commit is contained in:
Alessandro Ranellucci 2014-08-08 17:18:41 +02:00
parent 43b1aabb60
commit 678112b926

View file

@ -683,8 +683,15 @@ sub _update {
my $config = $self->{config};
# we enable spiral vase if other settings are compatible with it
# or if it is enabled (this prevents the checkbox from being disabled
# when an incompatible setting is set)
$self->get_field('spiral_vase')->toggle(
($config->perimeters == 1 && $config->top_solid_layers == 0 && $config->fill_density == 0)
|| $config->spiral_vase
);
my $have_perimeters = $config->perimeters > 0;
$self->get_field('spiral_vase')->toggle($config->perimeters == 1 && $config->top_solid_layers == 0 && $config->fill_density == 0);
$self->get_field($_)->toggle($have_perimeters)
for qw(extra_perimeters thin_walls overhangs seam_position external_perimeters_first);