-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ui] Use the location of the most recently imported images as the base folder for the "Import Images" dialog #1864
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well !
Maybe we could add something similar when a project is loaded ? For the moment the path is still the one of the .mg file. It could be the path of the first or last image loaded ?
Could also be interesting to make this feature work in-between sessions |
This commit changes the folder in which the "Import Images" dialog opens: it used to be opened in the folder in which the last .mg file had been opened, and it now opens in the folder from which the last images were imported. The location of the last imported images is saved, and used specifically when opening the "Import Images" dialog, as opposed to all the other dialogs which open in the folder of the last opened .mg file.
6f8812a
to
125a391
Compare
Done, the folders are now saved across sessions!
Also done. If no folder has been saved yet (or if the settings have all been reset), and the user opens a .mg file that contains images before trying to import images, the base folder for the "Import Images" dialog will be the location of the project's images. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need some modifications
…e base folder If a project has already been opened before the "Import Images" dialog is opened for the first time, and if the opened project has imported images, use the location of these images' folder as the base folder for the "Import Images" dialog. If the opened project has no imported images, the base folder will remain identical to the other dialogs' until images are imported.
Save up to 3 folder locations from which images have been imported. These folder locations will be saved across Meshroom sessions, in a similar fashion as the "Recent Files" entries. If no folder location has been saved (or if all saved folder locations are invalid), we fall back to the default behaviour: if a project with images has been opened before the "Import Images" action is called, then the base folder will be the folder containing the opened project's images.
125a391
to
1b5e33c
Compare
…aved Prior to saving the images' locations across sessions, if no image had been yet imported but a project file with images had been opened, the default base folder for the session became the project images' location. The location of dropped images back then was never saved. Now that the locations from the "Import Images" are saved across session, the possibilities of having no location saved have drastically decreased. The three cases where it can happen are the following: - the user has never opened Meshroom before (or the user has been using Meshroom without ever using "Import Images") - the user has cleared their Meshroom settings - the 3 saved locations have become invalid For these three cases, the default base folder is either set to the location of the first dropped image or to the opened project's images. That location is NOT saved for later sessions. Using the "Import Images" action is necessary for the location to be saved.
Description
Since #1778, all the actions from the "File" menu that open dialogs use the folder of the .mg file that was opened last as the base folder.
This is also the case for the "Import Images" dialog, which means that at each import, the dialog opens in the folder containing the most recently opened .mg file rather than the most recently imported images.
This PR changes that behaviour by saving the location of the last imported images, and using it as the base folder specifically for the "Import Images" dialog. The new behaviour can be summed up as follows:
The base folder for all the other file dialogs ("Open", "Save As", "Import Project", "Save As Template") remains unchanged.
Features list