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

Method AddFavorite

libs/misc/ImFileDialog.cpp:552–568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

GUIManagerMethod · 0.80

Calls 4

countFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected