From 2ecb2fd22dad30e4efd5bfe5e14ee0f0f7ffde3a Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Mon, 28 Nov 2022 11:17:52 +0800 Subject: [PATCH] FIX: STUDIO-1095 Prompt "import geometry data only" again Prompt "import geometry data only" again when importing old or other 3mf Change-Id: If3edd3c36efa09925a9131e31567b0672f84f84b (cherry picked from commit 90eba8d55563997ceb1bc8feb1e110680c3b3678) --- src/slic3r/GUI/Plater.cpp | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 0c3998e94..a7434c8c0 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -207,6 +207,14 @@ enum class LoadFilesType { Multiple3MFOther, }; +enum class LoadType : unsigned char +{ + Unknown, + OpenProject, + LoadGeometry, + LoadConfig +}; + class SlicedInfo : public wxStaticBoxSizer { public: @@ -2940,12 +2948,15 @@ std::vector Plater::priv::load_files(const std::vector& input_ wxGetApp().get_tab(Preset::TYPE_PRINT)->update(); } + LoadType load_type = static_cast(std::stoi(wxGetApp().app_config->get("import_project_action"))); + // BBS: version check Semver app_version = *(Semver::parse(SLIC3R_VERSION)); if (en_3mf_file_type == En3mfType::From_Prusa) { // do not reset the model config load_config = false; - show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf")); + if(load_type != LoadType::LoadGeometry) + show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf")); } else if (load_config && (file_version.maj() != app_version.maj())) { // version mismatch, only load geometries @@ -2960,10 +2971,12 @@ std::vector Plater::priv::load_files(const std::vector& input_ q->select_view_3D("3D"); // select plate 0 as default q->select_plate(0); - if (en_3mf_file_type == En3mfType::From_BBS) - show_info(q, _L("The 3mf is generated by old Bambu Studio, load geometry data only."), _L("Load 3mf")); - else - show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf")); + if (load_type != LoadType::LoadGeometry) { + if (en_3mf_file_type == En3mfType::From_BBS) + show_info(q, _L("The 3mf is generated by old Bambu Studio, load geometry data only."), _L("Load 3mf")); + else + show_info(q, _L("The 3mf is not from Bambu Lab, load geometry data only."), _L("Load 3mf")); + } for (ModelObject *model_object : model.objects) { model_object->config.reset(); // Is there any modifier or advanced config data? @@ -7823,14 +7836,6 @@ std::vector Plater::load_files(const std::vector& input_fil return p->load_files(paths, strategy, ask_multi); } -enum class LoadType : unsigned char -{ - Unknown, - OpenProject, - LoadGeometry, - LoadConfig -}; - class RadioBox; class RadioSelector {