[ui] save after drag&drop: split of handling types and processing files

First get type of files, then either ensure the save or process files.
This commit is contained in:
Aurore LAFAURIE 2024-03-21 18:35:46 +01:00
parent 67fbf1b00f
commit 58e9bafa45
3 changed files with 47 additions and 29 deletions

View file

@ -81,7 +81,14 @@ Item {
onRemoveImageRequest: reconstruction.removeAttribute(attribute)
onAllViewpointsCleared: { reconstruction.removeAllImages(); reconstruction.selectedViewId = "-1" }
onFilesDropped: {
reconstruction.handleFilesUrl(drop.urls, augmentSfm ? null : cameraInit)
var filesByType = _reconstruction.getFilesByTypeFromDrop(drop.urls)
if (filesByType["other"].length > 0) {
ensureSaved(function() {
reconstruction.handleFilesUrl(filesByType, augmentSfm ? null : cameraInit)
})
} else {
reconstruction.handleFilesUrl(filesByType, augmentSfm ? null : cameraInit)
}
}
}
LiveSfmView {