From 5fd216461266dd14ce611643f66b6771edfe0bca Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Thu, 17 May 2018 17:19:33 +0200 Subject: [PATCH] ConfigWizard: Fix incorrent wizard run after a language change --- xs/src/slic3r/GUI/AppConfig.hpp | 1 + xs/src/slic3r/GUI/ConfigWizard.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xs/src/slic3r/GUI/AppConfig.hpp b/xs/src/slic3r/GUI/AppConfig.hpp index a9d8f9307..08741e1e4 100644 --- a/xs/src/slic3r/GUI/AppConfig.hpp +++ b/xs/src/slic3r/GUI/AppConfig.hpp @@ -101,6 +101,7 @@ public: // Returns true if the user's data directory comes from before Slic3r 1.40.0 (no updating) bool legacy_datadir() const { return m_legacy_datadir; } + bool set_legacy_datadir(bool value) { m_legacy_datadir = value; } // Get the Slic3r version check url. // This returns a hardcoded string unless it is overriden by "version_check_url" in the ini file. diff --git a/xs/src/slic3r/GUI/ConfigWizard.cpp b/xs/src/slic3r/GUI/ConfigWizard.cpp index 1217f8683..6b8e8abaf 100644 --- a/xs/src/slic3r/GUI/ConfigWizard.cpp +++ b/xs/src/slic3r/GUI/ConfigWizard.cpp @@ -835,7 +835,9 @@ bool ConfigWizard::run(PresetBundle *preset_bundle, const PresetUpdater *updater { BOOST_LOG_TRIVIAL(info) << "Running ConfigWizard, reason: " << p->run_reason; if (ShowModal() == wxID_OK) { - p->apply_config(GUI::get_app_config(), preset_bundle, updater); + auto *app_config = GUI::get_app_config(); + p->apply_config(app_config, preset_bundle, updater); + app_config->set_legacy_datadir(false); BOOST_LOG_TRIVIAL(info) << "ConfigWizard applied"; return true; } else {