[ui] Fix drag and drop of heavy number of frames

This commit is contained in:
Aurore LAFAURIE 2024-04-19 12:20:55 +02:00
parent dea82607cd
commit f43b6e3461
2 changed files with 7 additions and 12 deletions

View file

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