fix the multiple stl no hint issue

Change-Id: I368060285890ccd3e440cdb04e7672d038e2a1d7
This commit is contained in:
lane.wei 2022-09-10 21:36:17 +08:00 committed by Lane.Wei
parent 5469534a6d
commit 7f1d87f20a

View file

@ -6814,9 +6814,25 @@ void Plater::add_model(bool imperial_units/* = false*/)
}
Plater::TakeSnapshot snapshot(this, snapshot_label);
// BBS: check file types
auto loadfiles_type = LoadFilesType::NoFile;
auto amf_files_count = get_3mf_file_count(paths);
if (paths.size() > 1 && amf_files_count < paths.size()) { loadfiles_type = LoadFilesType::Multiple3MFOther; }
if (paths.size() > 1 && amf_files_count == paths.size()) { loadfiles_type = LoadFilesType::Multiple3MF; }
if (paths.size() > 1 && amf_files_count == 0) { loadfiles_type = LoadFilesType::MultipleOther; }
if (paths.size() == 1 && amf_files_count == 1) { loadfiles_type = LoadFilesType::Single3MF; };
if (paths.size() == 1 && amf_files_count == 0) { loadfiles_type = LoadFilesType::SingleOther; };
bool ask_multi = false;
if (loadfiles_type == LoadFilesType::MultipleOther)
ask_multi = true;
auto strategy = LoadStrategy::LoadModel;
if (imperial_units) strategy = strategy | LoadStrategy::ImperialUnits;
if (!load_files(paths, strategy).empty()) {
if (!load_files(paths, strategy, ask_multi).empty()) {
wxGetApp().mainframe->update_title();
}
}