mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-04 20:01:58 +02:00
[ui] "Import Images" dialog: Use opened project's images folder as the 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.
This commit is contained in:
parent
2dc0a678a1
commit
5638cf3a75
3 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,7 @@ Panel {
|
|||
readonly property string currentItemSource: grid.currentItem ? grid.currentItem.source : ""
|
||||
readonly property var currentItemMetadata: grid.currentItem ? grid.currentItem.metadata : undefined
|
||||
readonly property int centerViewId: (_reconstruction && _reconstruction.sfmTransform) ? parseInt(_reconstruction.sfmTransform.attribute("transformation").value) : 0
|
||||
readonly property alias galleryGrid: grid
|
||||
|
||||
property int defaultCellSize: 160
|
||||
property bool readOnly: false
|
||||
|
|
|
@ -24,6 +24,7 @@ Item {
|
|||
property bool readOnly: false
|
||||
property alias panel3dViewer: panel3dViewerLoader.item
|
||||
readonly property Viewer2D viewer2D: viewer2D
|
||||
readonly property alias imageGallery: imageGallery
|
||||
|
||||
implicitWidth: 300
|
||||
implicitHeight: 400
|
||||
|
|
|
@ -482,6 +482,9 @@ ApplicationWindow {
|
|||
let folder = "";
|
||||
if (_reconstruction.graph && _reconstruction.graph.filepath) {
|
||||
folder = Filepath.stringToUrl(Filepath.dirname(_reconstruction.graph.filepath));
|
||||
if (imagesFolder.toString() === "" && workspaceView.imageGallery.galleryGrid.itemAtIndex(0) !== null) {
|
||||
imagesFolder = Filepath.dirname(workspaceView.imageGallery.galleryGrid.itemAtIndex(0).source);
|
||||
}
|
||||
} else {
|
||||
var projects = MeshroomApp.recentProjectFiles;
|
||||
if (projects.length > 0 && Filepath.exists(projects[0])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue