| 536 | } |
| 537 | |
| 538 | void FileDialog::RemoveFavorite(const std::string& path) |
| 539 | { |
| 540 | auto itr = std::find(m_favorites.begin(), m_favorites.end(), m_currentDirectory.u8string()); |
| 541 | |
| 542 | if (itr != m_favorites.end()) |
| 543 | m_favorites.erase(itr); |
| 544 | |
| 545 | // remove from sidebar |
| 546 | for (auto& p : m_treeCache) |
| 547 | if (p->Path == "Quick Access") { |
| 548 | for (size_t i = 0; i < p->Children.size(); i++) |
| 549 | if (p->Children[i]->Path == path) { |
| 550 | p->Children.erase(p->Children.begin() + i); |
| 551 | break; |
| 552 | } |
| 553 | break; |
| 554 | } |
| 555 | } |
| 556 | void FileDialog::AddFavorite(const std::string& path) |
| 557 | { |
| 558 | if (std::count(m_favorites.begin(), m_favorites.end(), path) > 0) |
nothing calls this directly
no outgoing calls
no test coverage detected