From a81d51d905bf6540ea7b092f8b8ada8dcb725778 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 22 Feb 2019 17:18:58 +0100 Subject: [PATCH] Removed unnecessary saving of slicer.ini --- src/slic3r/GUI/GUI_App.cpp | 2 +- src/slic3r/GUI/MainFrame.cpp | 16 +--------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 1847b2898..76d5f849a 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -161,7 +161,7 @@ bool GUI_App::OnInit() Bind(wxEVT_IDLE, [this](wxIdleEvent& event) { - if (app_config->dirty()) + if (app_config->dirty() && app_config->get("autosave") == "1") app_config->save(); // ! Temporary workaround for the correct behavior of the Scrolled sidebar panel diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index a9b28cdee..456811051 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -874,26 +874,12 @@ void MainFrame::on_value_changed(wxCommandEvent& event) 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 { - if (m_plater) { + if (m_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.