From 0d8de21429209779ba81f6875622df9ad0628dda Mon Sep 17 00:00:00 2001 From: tao wang Date: Tue, 18 Oct 2022 09:40:05 +0800 Subject: [PATCH] FIX:update the studio naming rules 1.use the name of the first project when importing multiple projects 2.name the current project with the part name Change-Id: Ia1a863173b3682a18dcc5a4d5e2245a53e309135 --- src/slic3r/GUI/Plater.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 2e512424a0..62156490de 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3503,8 +3503,12 @@ fs::path Plater::priv::get_export_file_path(GUI::FileType file_type) // for 3mf take the path from the project filename, if any output_file = into_path(get_project_filename(".3mf")); - if (output_file.empty()) - output_file = into_path(get_project_name() + ".3mf"); + //bbs name the project using the part name + if (output_file.empty()) { + if (get_project_name() != _L("Untitled")) { + output_file = into_path(get_project_name() + ".3mf"); + } + } if (output_file.empty()) { @@ -7194,6 +7198,11 @@ void Plater::add_model(bool imperial_units/* = false*/) auto strategy = LoadStrategy::LoadModel; if (imperial_units) strategy = strategy | LoadStrategy::ImperialUnits; if (!load_files(paths, strategy, ask_multi).empty()) { + + if (get_project_name() == _L("Untitled") && paths.size() > 0) { + p->set_project_filename(wxString(paths[0].string())); + } + wxGetApp().mainframe->update_title(); } }