MCPcopy Create free account
hub / github.com/chrxh/alien / RemoveFavorite

Method RemoveFavorite

external/ImFileDialog/ImFileDialog.cpp:536–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

beginMethod · 0.80
endMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected