mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-26 01:44:26 +08:00
Merge branch 'tm_quickfix_slaimport' into stable
This commit is contained in:
commit
1bf7b0866a
@ -119,6 +119,7 @@ public:
|
|||||||
wxString path;
|
wxString path;
|
||||||
Vec2i win = {2, 2};
|
Vec2i win = {2, 2};
|
||||||
std::string err;
|
std::string err;
|
||||||
|
ConfigSubstitutions config_substitutions;
|
||||||
|
|
||||||
priv(Plater *plt): plater{plt} {}
|
priv(Plater *plt): plater{plt} {}
|
||||||
};
|
};
|
||||||
@ -139,17 +140,16 @@ void SLAImportJob::process()
|
|||||||
if (p->path.empty()) return;
|
if (p->path.empty()) return;
|
||||||
|
|
||||||
std::string path = p->path.ToUTF8().data();
|
std::string path = p->path.ToUTF8().data();
|
||||||
ConfigSubstitutions config_substitutions;
|
|
||||||
try {
|
try {
|
||||||
switch (p->sel) {
|
switch (p->sel) {
|
||||||
case Sel::modelAndProfile:
|
case Sel::modelAndProfile:
|
||||||
config_substitutions = import_sla_archive(path, p->win, p->mesh, p->profile, progr);
|
p->config_substitutions = import_sla_archive(path, p->win, p->mesh, p->profile, progr);
|
||||||
break;
|
break;
|
||||||
case Sel::modelOnly:
|
case Sel::modelOnly:
|
||||||
config_substitutions = import_sla_archive(path, p->win, p->mesh, progr);
|
p->config_substitutions = import_sla_archive(path, p->win, p->mesh, progr);
|
||||||
break;
|
break;
|
||||||
case Sel::profileOnly:
|
case Sel::profileOnly:
|
||||||
config_substitutions = import_sla_archive(path, p->profile);
|
p->config_substitutions = import_sla_archive(path, p->profile);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,10 +157,6 @@ void SLAImportJob::process()
|
|||||||
p->err = ex.what();
|
p->err = ex.what();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! config_substitutions.empty()) {
|
|
||||||
show_substitutions_info(config_substitutions, path);
|
|
||||||
}
|
|
||||||
|
|
||||||
update_status(100, was_canceled() ? _(L("Importing canceled.")) :
|
update_status(100, was_canceled() ? _(L("Importing canceled.")) :
|
||||||
_(L("Importing done.")));
|
_(L("Importing done.")));
|
||||||
}
|
}
|
||||||
@ -186,6 +182,7 @@ void SLAImportJob::prepare()
|
|||||||
p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : path.ToUTF8();
|
p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : path.ToUTF8();
|
||||||
p->sel = dlg.get_selection();
|
p->sel = dlg.get_selection();
|
||||||
p->win = dlg.get_marchsq_windowsize();
|
p->win = dlg.get_marchsq_windowsize();
|
||||||
|
p->config_substitutions.clear();
|
||||||
} else {
|
} else {
|
||||||
p->path = "";
|
p->path = "";
|
||||||
}
|
}
|
||||||
@ -229,7 +226,10 @@ void SLAImportJob::finalize()
|
|||||||
p->plater->sidebar().obj_list()->load_mesh_object(p->mesh, name, is_centered);
|
p->plater->sidebar().obj_list()->load_mesh_object(p->mesh, name, is_centered);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! p->config_substitutions.empty())
|
||||||
|
show_substitutions_info(p->config_substitutions, p->path.ToUTF8().data());
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
}}
|
}} // namespace Slic3r::GUI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user