mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
New --autosave option for better toolchain integration. #837
This commit is contained in:
@@ -45,6 +45,7 @@ use constant MI_DOCUMENTATION => &Wx::NewId;
|
||||
our $datadir;
|
||||
our $no_plater;
|
||||
our $mode;
|
||||
our $autosave;
|
||||
|
||||
our $Settings = {
|
||||
_ => {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user