diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 06826a6d6..d7fd1ff42 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -3805,7 +3805,8 @@ void GUI_App::ShowUserGuide() { bool res = false; GuideFrame GuideDlg(this); //if (GuideDlg.IsFirstUse()) - res = GuideDlg.run(); + bool config_applied = false; + res = GuideDlg.run(config_applied); if (res) { load_current_presets(); update_publish_status(); @@ -3860,7 +3861,8 @@ void GUI_App::ShowOnlyFilament() { bool res = false; GuideFrame GuideDlg(this); GuideDlg.SetStartPage(GuideFrame::GuidePage::BBL_FILAMENT_ONLY); - res = GuideDlg.run(); + bool config_applied = false; + res = GuideDlg.run(config_applied); if (res) { load_current_presets(); @@ -7042,7 +7044,9 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage start_page == ConfigWizard::SP_PRINTERS ? GuideFrame::BBL_MODELS_ONLY : GuideFrame::BBL_MODELS; wizard.SetStartPage(page); - bool res = wizard.run(); + + bool config_applied = false; + bool res = wizard.run(config_applied); if (res) { load_current_presets(); @@ -7050,7 +7054,7 @@ bool GUI_App::run_wizard(ConfigWizard::RunReason reason, ConfigWizard::StartPage mainframe->refresh_plugin_tips(); // BBS: remove SLA related message } - else { + else if (config_applied){ MessageDialog msg_dlg(mainframe, m_install_preset_fail_text, _L("Install presets failed"), wxAPPLY | wxOK); msg_dlg.ShowModal(); } diff --git a/src/slic3r/GUI/WebGuideDialog.cpp b/src/slic3r/GUI/WebGuideDialog.cpp index 2f9af1e18..b0479efd2 100644 --- a/src/slic3r/GUI/WebGuideDialog.cpp +++ b/src/slic3r/GUI/WebGuideDialog.cpp @@ -943,7 +943,7 @@ bool GuideFrame::apply_config(AppConfig *app_config, PresetBundle *preset_bundle return true; } -bool GuideFrame::run() +bool GuideFrame::run(bool& config_applied) { //BOOST_LOG_TRIVIAL(info) << boost::format("Running ConfigWizard, reason: %1%, start_page: %2%") % reason % start_page; @@ -969,8 +969,10 @@ bool GuideFrame::run() if (result == wxID_OK) { bool apply_keeped_changes = false; BOOST_LOG_TRIVIAL(info) << "GuideFrame returned ok"; - if (! this->apply_config(app.app_config, app.preset_bundle, app.preset_updater, apply_keeped_changes)) + if (! this->apply_config(app.app_config, app.preset_bundle, app.preset_updater, apply_keeped_changes)) { + config_applied = true; return false; + } if (apply_keeped_changes) app.apply_keeped_preset_modifications(); diff --git a/src/slic3r/GUI/WebGuideDialog.hpp b/src/slic3r/GUI/WebGuideDialog.hpp index 865198b78..97e2c71f4 100644 --- a/src/slic3r/GUI/WebGuideDialog.hpp +++ b/src/slic3r/GUI/WebGuideDialog.hpp @@ -81,7 +81,7 @@ public: bool apply_config(AppConfig *app_config, PresetBundle *preset_bundle, const PresetUpdater *updater, bool& apply_keeped_changes); - bool run(); + bool run(bool& config_applied); void StrReplace(std::string &strBase, std::string strSrc, std::string strDes); std::string w2s(wxString sSrc);