1
0
mirror of synced 2024-12-01 10:47:19 +01:00

impr: Manually sort file chooser popup list

This commit is contained in:
WerWolv 2023-05-21 18:41:43 +02:00
parent a2333fa22e
commit f57d4f2f7a

View File

@ -13,7 +13,12 @@ namespace hex::plugin::builtin {
: hex::Popup<PopupFileChooser>("hex.builtin.common.choose_file"),
m_indices({ }), m_files(files),
m_openCallback(callback),
m_validExtensions(validExtensions), m_multiple(multiple) { }
m_validExtensions(validExtensions), m_multiple(multiple) {
std::sort(this->m_files.begin(), this->m_files.end(), [](const std::fs::path &a, const std::fs::path &b) {
return a.filename() < b.filename();
});
}
void drawContent() override {
bool doubleClicked = false;