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

Method GetResultingSelection

ImGuiFileDialog.cpp:2752–2773  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2750}
2751
2752std::map<std::string, std::string> IGFD::FileManager::GetResultingSelection(FileDialogInternal& vFileDialogInternal, IGFD_ResultMode vFlag) {
2753 std::map<std::string, std::string> res;
2754 const auto& result_path = GetResultingPath();
2755 if (!m_SelectedFileNames.empty()) {
2756 for (const auto& selectedFileName : m_SelectedFileNames) {
2757 auto result = result_path;
2758#ifdef _IGFD_UNIX_
2759 if (fsRoot != result)
2760#endif // _IGFD_UNIX_
2761 {
2762 result += IGFD::Utils::GetPathSeparator();
2763 }
2764 result += vFileDialogInternal.filterManager.ReplaceExtentionWithCurrentFilterIfNeeded(selectedFileName, vFlag);
2765 res[selectedFileName] = result;
2766 }
2767 } else { // opened directory with no selection
2768 if (vFileDialogInternal.fileManager.dLGDirectoryMode) { // directory mode
2769 res["."] = result_path;
2770 }
2771 }
2772 return res;
2773}
2774
2775void IGFD::FileDialogInternal::NewFrame() {
2776 canWeContinue = true; // reset flag for possibily validate the dialog

Callers 1

GetSelectionMethod · 0.80

Calls 2

emptyMethod · 0.80

Tested by

no test coverage detected