New --autosave option for better toolchain integration. #837

This commit is contained in:
Alessandro Ranellucci 2013-06-02 20:03:22 +02:00
parent 895e0bbfcd
commit 8c74d2f41e
4 changed files with 11 additions and 3 deletions

View file

@ -49,9 +49,12 @@ sub new {
$self->{tabpanel},
on_value_change => sub {
$self->{plater}->on_config_change(@_) if $self->{plater}; # propagate config change events to the plater
if ($self->{mode} eq 'simple' && $init) { # don't save while loading for the first time
# save config
$self->config->save("$Slic3r::GUI::datadir/simple.ini");
if ($init) { # don't save while loading for the first time
if ($self->{mode} eq 'simple') {
# save config
$self->config->save("$Slic3r::GUI::datadir/simple.ini");
}
$self->config->save($Slic3r::GUI::autosave) if $Slic3r::GUI::autosave;
}
},
on_presets_changed => sub {