diff --git a/src/slic3r/GUI/BackgroundSlicingProcess.cpp b/src/slic3r/GUI/BackgroundSlicingProcess.cpp index a71e7cca0d..c27f99b1ee 100644 --- a/src/slic3r/GUI/BackgroundSlicingProcess.cpp +++ b/src/slic3r/GUI/BackgroundSlicingProcess.cpp @@ -690,6 +690,15 @@ Print::ApplyStatus BackgroundSlicingProcess::apply(const Model &model, const Dyn DynamicPrintConfig new_config = config; new_config.apply(*m_current_plate->config()); Print::ApplyStatus invalidated = m_print->apply(model, new_config); + + // Orca: prevent resetting under gcode viewer mode + if (invalidated != PrintBase::APPLY_STATUS_UNCHANGED) { + const auto plater = GUI::wxGetApp().mainframe->m_plater; + if (plater && plater->only_gcode_mode()) { + invalidated = PrintBase::APPLY_STATUS_UNCHANGED; + } + } + if ((invalidated & PrintBase::APPLY_STATUS_INVALIDATED) != 0 && m_print->technology() == ptFFF && !m_fff_print->is_step_done(psGCodeExport)) { // Some FFF status was invalidated, and the G-code was not exported yet. diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 58504a064c..c52cd7cc6a 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -791,17 +791,6 @@ void GUI_App::post_init() if (! this->initialized()) throw Slic3r::RuntimeError("Calling post_init() while not yet initialized"); - if (app_config->get("sync_user_preset") == "true") { - // BBS loading user preset - // Always async, not such startup step - // BOOST_LOG_TRIVIAL(info) << "Loading user presets..."; - // scrn->SetText(_L("Loading user presets...")); - if (m_agent) { start_sync_user_preset(); } - BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: true"; - } else { - BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: false"; - } - m_open_method = "double_click"; bool switch_to_3d = false; @@ -957,6 +946,20 @@ void GUI_App::post_init() } } + // Start preset sync after project opened, otherwise we could have preset change during project opening which could cause crash + if (app_config->get("sync_user_preset") == "true") { + // BBS loading user preset + // Always async, not such startup step + // BOOST_LOG_TRIVIAL(info) << "Loading user presets..."; + // scrn->SetText(_L("Loading user presets...")); + if (m_agent) { + start_sync_user_preset(); + } + BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: true"; + } else { + BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " sync_user_preset: false"; + } + // The extra CallAfter() is needed because of Mac, where this is the only way // to popup a modal dialog on start without screwing combo boxes. // This is ugly but I honestly found no better way to do it.