Do not reset sl1 import dialog settings between imports

This commit is contained in:
tamasmeszaros 2021-11-05 15:29:58 +01:00
parent fb429c1e23
commit 1c940ef145

View File

@ -122,7 +122,9 @@ public:
std::string err; std::string err;
ConfigSubstitutions config_substitutions; ConfigSubstitutions config_substitutions;
priv(Plater *plt) : plater{plt} {} ImportDlg import_dlg;
priv(Plater *plt) : plater{plt}, import_dlg{plt} {}
}; };
SLAImportJob::SLAImportJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater) SLAImportJob::SLAImportJob(std::shared_ptr<ProgressIndicator> pri, Plater *plater)
@ -176,14 +178,12 @@ void SLAImportJob::prepare()
{ {
reset(); reset();
ImportDlg dlg{p->plater}; if (p->import_dlg.ShowModal() == wxID_OK) {
auto path = p->import_dlg.get_path();
if (dlg.ShowModal() == wxID_OK) {
auto path = dlg.get_path();
auto nm = wxFileName(path); auto nm = wxFileName(path);
p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : nm.GetFullPath(); p->path = !nm.Exists(wxFILE_EXISTS_REGULAR) ? "" : nm.GetFullPath();
p->sel = dlg.get_selection(); p->sel = p->import_dlg.get_selection();
p->win = dlg.get_marchsq_windowsize(); p->win = p->import_dlg.get_marchsq_windowsize();
p->config_substitutions.clear(); p->config_substitutions.clear();
} else { } else {
p->path = ""; p->path = "";