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