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

Method AddFavorite

external/ImFileDialog/ImFileDialog.cpp:554–570  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected