nanogui
nanogui copied to clipboard
file_dialog interferes with relative paths
I want to load an image after I have chosen a file with a file_dialog triggered from a button. That is double-click a file or select and open it. I use a relative path like "..\MyImages/someImage000.png" for loading the image, but it seems to only work in my program when I have not used file_dialog as described before. It still works with the full hardcoded path, but I was wondering why the file_dialog interferes with that at all.
The working directory indeed changes after testing it with getcwd. It changes to the new file, which surprised me. Now, I just save the previous working directory string and switch back to it in the callback with chdir. Keeping this ticket open because I am unsure if this behavior is expected.