Removed unnecessary saving of slicer.ini

This commit is contained in:
bubnikv 2019-02-22 17:18:58 +01:00
parent a1fdbf213c
commit a81d51d905
2 changed files with 2 additions and 16 deletions

View File

@ -161,7 +161,7 @@ bool GUI_App::OnInit()
Bind(wxEVT_IDLE, [this](wxIdleEvent& event) Bind(wxEVT_IDLE, [this](wxIdleEvent& event)
{ {
if (app_config->dirty()) if (app_config->dirty() && app_config->get("autosave") == "1")
app_config->save(); app_config->save();
// ! Temporary workaround for the correct behavior of the Scrolled sidebar panel // ! Temporary workaround for the correct behavior of the Scrolled sidebar panel

View File

@ -874,26 +874,12 @@ void MainFrame::on_value_changed(wxCommandEvent& event)
m_plater->on_extruders_change(value); m_plater->on_extruders_change(value);
} }
} }
// Don't save while loading for the first time.
if (m_loaded) {
AppConfig &cfg = *wxGetApp().app_config;
if (cfg.get("autosave") == "1")
cfg.save();
}
} }
void MainFrame::on_config_changed(DynamicPrintConfig* config) const void MainFrame::on_config_changed(DynamicPrintConfig* config) const
{ {
if (m_plater) { if (m_plater)
m_plater->on_config_change(*config); // propagate config change events to the plater m_plater->on_config_change(*config); // propagate config change events to the plater
}
// Don't save while loading for the first time.
if (m_loaded) {
AppConfig &cfg = *wxGetApp().app_config;
if (cfg.get("autosave") == "1")
cfg.save();
}
} }
// Called after the Preferences dialog is closed and the program settings are saved. // Called after the Preferences dialog is closed and the program settings are saved.