Add stl, step, etc. to recent list (#9481)

* Add stl, step, etc. to recent list

* Make configurable

* Merge branch 'main' into recent-files-pr
This commit is contained in:
Vovodroid
2025-08-23 19:24:30 +03:00
committed by GitHub
parent 5ebb490a8d
commit 5fa35342fd
4 changed files with 21 additions and 3 deletions

View File

@@ -11233,6 +11233,8 @@ void Plater::add_file()
p->set_project_name(from_u8(full_path.stem().string()));
}
wxGetApp().mainframe->update_title();
if (wxGetApp().app_config->get("recent_models") == "true")
wxGetApp().mainframe->add_to_recent_projects(paths[0].wstring());
}
break;
}
@@ -11254,6 +11256,9 @@ void Plater::add_file()
p->set_project_name(from_u8(full_path.stem().string()));
}
wxGetApp().mainframe->update_title();
if (wxGetApp().app_config->get("recent_models") == "true")
for (auto &path : paths)
wxGetApp().mainframe->add_to_recent_projects(path.wstring());
}
break;
}
@@ -11271,7 +11276,12 @@ void Plater::add_file()
open_3mf_file(first_file[0]);
load_files(tmf_file, LoadStrategy::LoadModel);
if (!load_files(other_file, LoadStrategy::LoadModel, false).empty()) { wxGetApp().mainframe->update_title();}
if (!load_files(other_file, LoadStrategy::LoadModel, false).empty()) {
wxGetApp().mainframe->update_title();
if (wxGetApp().app_config->get("recent_models") == "true")
for (auto &file : other_file)
wxGetApp().mainframe->add_to_recent_projects(file.wstring());
}
break;
default:break;
}