diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 6657657a50..7ac5afce35 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -11004,6 +11004,7 @@ int Plater::new_project(bool skip_confirm, bool silent, const wxString& project_ bool transfer_preset_changes = false; // BBS: save confirm auto check = [this,&transfer_preset_changes](bool yes_or_no) { + m_new_project_and_check_state = true; wxString header = _L("Some presets are modified.") + "\n" + (yes_or_no ? _L("You can keep the modified presets to the new project or discard them") : _L("You can keep the modified presets to the new project, discard or save changes as new presets.")); @@ -11013,7 +11014,9 @@ int Plater::new_project(bool skip_confirm, bool silent, const wxString& project_ if (m_exported_file) { //.gcode.3mf ignore presets modify m_exported_file = false; } - return wxGetApp().check_and_keep_current_preset_changes(_L("Creating a new project"), header, act_buttons, &transfer_preset_changes); + bool result = wxGetApp().check_and_keep_current_preset_changes(_L("Creating a new project"), header, act_buttons, &transfer_preset_changes); + m_new_project_and_check_state = false; + return result; }; int result; if (!skip_confirm && (result = close_with_confirm(check)) == wxID_CANCEL) @@ -13444,6 +13447,9 @@ void Plater::add_file() void Plater::update(bool conside_update_flag, bool force_background_processing_update) { + if (is_new_project_and_check_state()) { + return; + } unsigned int flag = force_background_processing_update ? (unsigned int)Plater::priv::UpdateParams::FORCE_BACKGROUND_PROCESSING_UPDATE : 0; if (conside_update_flag) { if (need_update()) { diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index 724cbffcd1..110fc39a24 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -352,6 +352,7 @@ public: bool is_multi_extruder_ams_empty(); // BBS + bool is_new_project_and_check_state() { return m_new_project_and_check_state; } wxString get_project_name(); void update_all_plate_thumbnails(bool force_update = false); void update_obj_preview_thumbnail(ModelObject *, int obj_idx, int vol_idx, std::vector colors, int camera_view_angle_type); @@ -924,6 +925,7 @@ private: bool m_exported_file { false }; bool skip_thumbnail_invalid { false }; bool m_loading_project { false }; + bool m_new_project_and_check_state{false}; std::string m_preview_only_filename; int m_valid_plates_count { 0 }; int m_check_status = 0; // 0 not check, 1 check success, 2 check failed