Repository navigation
Description
Would it be useful for Step 1 to remember separate locations for loading raw data, loading parameters and saving parameters, including after restarting the application? Before preparing a PR, I would like to agree on the expected behavior and how this should fit into the existing project.
These operations often use different directories. Ideally, opening a parameter file would not change the suggested location for the next raw-data selection. This is the dialog-location follow-up mentioned in #600, kept separate from the timing/resource work merged in #608. It also relates to the broader request for persistent application settings in #177.
What already exists
From source inspection at be4dc8b78cf6c320721cbaf13bc315d351c7c877:
- The existing
mandeye::fdwrapper supplies a common in-memorylastLocationHint, initialized to"."in its header. - File-open and file-save dialogs update this hint after a selection.
SelectFolder()reads it without updating it. - This wrapper does not persist the hint across restarts or distinguish the three purposes above. Native dialog history may provide additional behavior; I have not verified that interactively across Windows, Linux and macOS, so I would welcome reports of what users already experience.
Possible architecture, open for discussion
Extend the existing wrapper with an optional location context, starting with the three Step 1 operations. Keep existing callers working with their current defaults. Let a shared preference mechanism supply the remembered directory; the caller would confirm successful use before that preference is updated.
Store these paths as per-user UI preferences, separate from processing TOML files and HDMapping_results_*.json. If there is an existing or planned preference store that should own this, I would prefer to reuse it rather than introduce another settings file.
The proposed behavior would be:
- Remember each context independently across restarts. For file dialogs, remember the containing directory.
- Preserve the previous value after cancellation or a failed load/save. Remember raw-data input after successful loading, without requiring the subsequent SLAM processing to succeed.
- Treat the stored path as a suggested starting location, without automatically loading the previous dataset. Explicit paths and drag-and-drop should continue to work.
- Fall back gracefully when a remembered directory is missing or unavailable, and provide a way to clear remembered locations.
Questions before implementation
- Are three independent locations useful, or should parameter loading and saving share one? What behavior do the current native dialogs already provide on your platform?
- Where should these preferences live, and should contexts be scoped per tool or shared across the suite? The initial UI change could remain limited to Step 1.
- Should locations update after successful use as proposed, or simply after selection? Should successful drag-and-drop/explicit-path loading also update the raw-data location?
I can test the application logic and Windows dialogs locally. Native dialog behavior on Linux and macOS would need confirmation from users of those platforms; compilation checks alone would not establish it. Agreeing on the behavior first would give a small follow-up PR a clear target.
Activity