diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 830e373bfc..9c5ec72d4e 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -1048,19 +1048,12 @@ void GUI_App::post_init() else { mainframe->select_tab(size_t(MainFrame::tp3DEditor)); plater_->select_view_3D("3D"); - Plater::TakeSnapshot snapshot(this->plater(), "Load Project", UndoRedo::SnapshotType::ProjectSeparator); - const std::vector res = this->plater()->load_files(this->init_params->input_files); - if (!res.empty()) { - if (this->init_params->input_files.size() == 1) { - // Update application titlebar when opening a project file - const std::string& filename = this->init_params->input_files.front(); - this->plater()->up_to_date(true, false); - this->plater()->up_to_date(true, true); - //BBS: remove amf logic as project - if (boost::algorithm::iends_with(filename, ".3mf")) - this->plater()->set_project_filename(from_u8(filename)); - } + wxArrayString input_files; + for (auto & file : this->init_params->input_files) { + input_files.push_back(file); } + this->plater()->set_project_filename(_L("Untitled")); + this->plater()->load_files(input_files); } } } diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 08784b52a5..17f7a11657 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -7696,6 +7696,7 @@ int Plater::new_project(bool skip_confirm, bool silent) //get_partplate_list().update_slice_context_to_current_plate(p->background_process); //p->preview->update_gcode_result(p->partplate_list.get_current_slice_result()); reset(transfer_preset_changes); + reset_project_dirty_after_save(); reset_project_dirty_initial_presets(); wxGetApp().update_saved_preset_from_current_preset(); update_project_dirty_from_presets(); @@ -7871,7 +7872,7 @@ int Plater::save_project(bool saveAs) up_to_date(true, true); wxGetApp().update_saved_preset_from_current_preset(); - p->dirty_state.reset_after_save(); + reset_project_dirty_after_save(); return wxID_YES; }