Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MotivaCG
Copy link
Contributor

Right now, every time Colmap is restarted, all file dialogs start from the default location. This forces the user to browse back to the project or dataset folder again and again, which is annoying.

This PR changes that behavior by using Qt QSettings to store the last-used directory for each dialog (open, save, import, export, etc.), with a global fallback. That way, the next time a dialog is opened it will point to the folder the user was previously working in.

@ahojnnes
Copy link
Contributor

Thanks, this seems like a nice improvement. I don't know about QSettings. Where are these settings persisted?

@MotivaCG
Copy link
Contributor Author

We are using QSettings("Colmap", "UISettings") and Qt uses the native settings location of each platform, so the saved paths are persistent across application restarts:

In Windows:
Stored in the registry under
HKEY_CURRENT_USER\Software\Colmap\UISettings

In macOS:
Stored in ~/Library/Preferences/com.Colmap.UISettings.plist

In Linux:
Stored in a plain ini file under
~/.config/Colmap/UISettings.conf

Regards, Víctor

Copy link
Contributor

@ahojnnes ahojnnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your answer. Left a few minor comments, otherwise looks good to me.

@ahojnnes ahojnnes enabled auto-merge (squash) August 20, 2025 16:25
@ahojnnes ahojnnes merged commit f1b227b into colmap:main Aug 20, 2025
13 checks passed
tavislocus pushed a commit to tavislocus/colmap_6dof that referenced this pull request Aug 22, 2025
…map#3585)

Right now, every time Colmap is restarted, all file dialogs start from
the default location. This forces the user to browse back to the project
or dataset folder again and again, which is annoying.

This PR changes that behavior by using Qt QSettings to store the
last-used directory for each dialog (open, save, import, export, etc.),
with a global fallback. That way, the next time a dialog is opened it
will point to the folder the user was previously working in.

---------

Co-authored-by: Johannes Schönberger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants