From 3fff9b5c7f4a23f3e44d432ab88d2f624af64b1c Mon Sep 17 00:00:00 2001 From: "chunmao.guo" Date: Tue, 11 Apr 2023 18:36:31 +0800 Subject: [PATCH] FIX: [STUDIO-2563] snapshot dirty load 3mf on post_init Change-Id: I769eae7924ef3f1fefb4a9ce1a8280f477a7d49e --- src/slic3r/GUI/GUI_App.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index e0b0b5276..b465f0b67 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -61,6 +61,7 @@ #include "../Utils/Process.hpp" #include "../Utils/MacDarkMode.hpp" #include "../Utils/Http.hpp" +#include "../Utils/UndoRedo.hpp" #include "slic3r/Config/Snapshot.hpp" #include "Preferences.hpp" #include "Tab.hpp" @@ -1030,11 +1031,14 @@ 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));