MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / m_AddFileNameInSelection

Method m_AddFileNameInSelection

ImGuiFileDialog.cpp:2307–2322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2305}
2306
2307void IGFD::FileManager::m_AddFileNameInSelection(const std::string& vFileName, bool vSetLastSelectionFileName) {
2308 if (vFileName == "." || vFileName == "..") {
2309 return;
2310 }
2311 m_SelectedFileNames.emplace(vFileName);
2312
2313 if (m_SelectedFileNames.size() == 1) {
2314 snprintf(fileNameBuffer, MAX_FILE_DIALOG_NAME_BUFFER, "%s", vFileName.c_str());
2315 } else {
2316 snprintf(fileNameBuffer, MAX_FILE_DIALOG_NAME_BUFFER, "%zu files Selected", m_SelectedFileNames.size());
2317 }
2318
2319 if (vSetLastSelectionFileName) {
2320 m_LastSelectedFileName = vFileName;
2321 }
2322}
2323
2324void IGFD::FileManager::SetCurrentDir(const std::string& vPath) {
2325 std::string path = vPath;

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected