Bugfix: changes in extruder count in GUI were not propagating to the rest of the GUI

This commit is contained in:
Alessandro Ranellucci 2014-09-21 15:29:52 +02:00
parent 16b6cdcd6e
commit 321b70115b
2 changed files with 32 additions and 9 deletions

View file

@ -85,8 +85,13 @@ sub _init_tabpanel {
my $tab;
$tab = $self->{options_tabs}{$tab_name} = ($class_prefix . ucfirst $tab_name)->new($panel);
$tab->on_value_change(sub {
my ($opt_key, $value) = @_;
my $config = $tab->config;
$self->{plater}->on_config_change($config) if $self->{plater}; # propagate config change events to the plater
if ($self->{plater}) {
$self->{plater}->on_config_change($config); # propagate config change events to the plater
$self->{plater}->on_extruders_change($value) if $opt_key eq 'extruders_count';
}
if ($self->{loaded}) { # don't save while loading for the first time
if ($self->{mode} eq 'simple') {
# save config