| 550 | } |
| 551 | } |
| 552 | void FileDialog::AddFavorite(const std::string& path) |
| 553 | { |
| 554 | if (std::count(m_favorites.begin(), m_favorites.end(), path) > 0) |
| 555 | return; |
| 556 | |
| 557 | if (!std::filesystem::exists(std::filesystem::u8path(path))) |
| 558 | return; |
| 559 | |
| 560 | m_favorites.push_back(path); |
| 561 | |
| 562 | // add to sidebar |
| 563 | for (auto& p : m_treeCache) |
| 564 | if (p->Path == "Quick Access") { |
| 565 | p->Children.push_back(new FileTreeNode(path)); |
| 566 | break; |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | void FileDialog::m_select(const std::filesystem::path& path, bool isCtrlDown) |
| 571 | { |
no test coverage detected