[ui] ImageGallery: Reset viewpoints and intrinsics when removing the last image

When the last image from the active group has been manually removed from
the Image Gallery (meaning it has been removed either with the "Del" key
or the "Remove" option), the list of viewpoints and intrinsics should
both be reset, like they are when "Clear Images" is used.

Prior to this commit, the list of viewpoints was emptied (but not reset)
and the list of intrinsics remained untouched. Removing all the images
manually did not affect the list of intrinsics, which could cause issues
later on.
This commit is contained in:
Candice Bentéjac 2023-05-30 12:20:54 +02:00
parent cef8cf6fd8
commit e8990a6fc7
2 changed files with 8 additions and 2 deletions

View file

@ -80,6 +80,7 @@ Item {
tempCameraInit: reconstruction ? reconstruction.tempCameraInit : null
cameraInitIndex: reconstruction ? reconstruction.cameraInitIndex : -1
onRemoveImageRequest: reconstruction.removeAttribute(attribute)
onAllViewpointsCleared: { reconstruction.clearImages(); reconstruction.selectedViewId = "-1" }
onFilesDropped: reconstruction.handleFilesDrop(drop, augmentSfm ? null : cameraInit)
}
LiveSfmView {