ENH: 3mf: fix save fullpath issue

jira: STUDIO-12970
Change-Id: I71bbd9fd3e1bae669fcc29822f75a3ab9025af56
(cherry picked from commit da0f893433049899227a71e5ddc79833431ce39a)
This commit is contained in:
zhou.xu
2025-06-27 12:21:12 +08:00
committed by Noisyfox
parent 3ba39f694b
commit 94732b6bad
3 changed files with 39 additions and 23 deletions

View File

@@ -11067,7 +11067,12 @@ int Plater::save_project(bool saveAs)
return wxID_CANCEL;
//BBS export 3mf without gcode
if (export_3mf(into_path(filename), SaveStrategy::SplitModel | SaveStrategy::ShareMesh | SaveStrategy::FullPathSources) < 0) {
auto save_strategy = SaveStrategy::SplitModel | SaveStrategy::ShareMesh;
bool full_pathnames = wxGetApp().app_config->get_bool("export_sources_full_pathnames");
if (full_pathnames) {
save_strategy = save_strategy | SaveStrategy::FullPathSources;
}
if (export_3mf(into_path(filename), save_strategy) < 0) {
MessageDialog(this, _L("Failed to save the project.\nPlease check whether the folder exists online or if other programs open the project file."),
_L("Save project"), wxOK | wxICON_WARNING).ShowModal();
return wxID_CANCEL;