Skip to content

Commit

Permalink
Fix navigation path in File Dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
drhelius committed Dec 28, 2023
1 parent a4b91ee commit a2e8af2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions platforms/desktop-shared/FileBrowser/ImGuiFileBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ namespace imgui_addons
current_path = start_path;
if (current_path.back() != '/')
current_path += '/';
parsePathTabs(current_path);
}

/* If current path is empty (can happen on Windows if user closes dialog while inside MyComputer.
Expand Down Expand Up @@ -798,11 +799,11 @@ namespace imgui_addons
//Remove trailing "*" returned by ** dir->wdirp->patt **
current_directory.pop_back();
current_path = current_directory;
}

//Create a vector of each directory in the file path for the filepath bar. Not Necessary for linux as starting directory is "/"
//Create a vector of each directory in the file path for the filepath bar. Not Necessary for linux as starting directory is "/"

}
parsePathTabs(current_path);

#endif // OSWIN

// store all the files and directories within directory and clear previous entries
Expand Down Expand Up @@ -1105,6 +1106,8 @@ namespace imgui_addons
std::string path_element = "";
std::string root = "";

current_dirlist.clear();

#ifdef OSWIN
current_dirlist.push_back("Computer");
#else
Expand Down

0 comments on commit a2e8af2

Please sign in to comment.