MCPcopy Create free account
hub / github.com/dfranx/SHADERed / RemoveFavorite

Method RemoveFavorite

libs/misc/ImFileDialog.cpp:534–551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected