Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2019-02-22 19:18:58 +0300
committerbubnikv <bubnikv@gmail.com>2019-02-22 19:18:58 +0300
commita81d51d905bf6540ea7b092f8b8ada8dcb725778 (patch)
tree6a49706bfb971d404e20db2d4daa4f053a65a3eb /src
parenta1fdbf213c9a50fd8da3e7f1b7612d1b969e8c4e (diff)
Removed unnecessary saving of slicer.ini
Diffstat (limited to 'src')
-rw-r--r--src/slic3r/GUI/GUI_App.cpp2
-rw-r--r--src/slic3r/GUI/MainFrame.cpp16
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.