fix: open file dialogs in a sensible default directory instead of the working directory#11256
fix: open file dialogs in a sensible default directory instead of the working directory#11256BenJule wants to merge 1 commit into
Conversation
|
Hi, please merge it into one patch and then submit your test results. Thanks. |
… working directory File-selection dialogs opened in the process working directory. Open them in a sensible location instead: the referenced file's own folder where one exists, otherwise the last-used directory. Covers the open/import/export/replace dialogs across BedShapeDialog, PhysicalPrinterDialog, StatusPanel, Plater and GUI_App.
e7f1b6d to
44318cf
Compare
|
Done - squashed into a single commit. On the change itself: all the affected dialogs (open/import/export/replace across BedShapeDialog, PhysicalPrinterDialog, StatusPanel, Plater and GUI_App) now start in a sensible folder - the referenced file's own directory when there is one, otherwise the last-used directory - instead of the process working directory. The behaviour to check is: open one of these dialogs, pick a file in some folder, reopen the same dialog and confirm it starts in that folder again rather than the CWD. Full disclosure: I don't have a macOS/Windows GUI build environment here, so I've verified the logic by tracing the code paths rather than capturing a recorded run. If a maintainer build is handy, those are the flows to confirm. |
Several
wxFileDialogcall sites passed an empty directory, so they opened in the current working directory (which can be a temp folder) instead of somewhere useful.Relocation dialogs (a file path is known) now open in that file's own folder, falling back to the last used directory:
Open dialogs (no prior path) now open in the last used directory:
GUI_App)BedShapeDialog)StatusPanel)PhysicalPrinterDialog)No functional changes — only the dialogs' initial directory. Adjacent to the temp-working-dir behaviour reported in #11253, though it does not by itself fix the Import-3mf / Save-As default there.