Merge pull request #2237 from alicevision/dev/highlightSelectedCamera

[Viewer3D] Connect any change of the selected view ID to the SfmDataLoader
This commit is contained in:
Fabien Castan 2023-11-17 22:58:53 +01:00 committed by GitHub
commit df7de6d9c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View file

@ -117,6 +117,12 @@ import Utils 1.0
resectionId = Viewer3DSettings.resectionIdCount resectionId = Viewer3DSettings.resectionIdCount
root.status = obj.status; root.status = obj.status;
}) })
obj.cameraSelected.connect(
function(viewId) {
obj.selectedViewId = viewId
}
)
} }
} }
} }

View file

@ -17,6 +17,13 @@ SfmDataEntity {
signal cameraSelected(var viewId) signal cameraSelected(var viewId)
Connections {
target: _reconstruction
function onSelectedViewIdChanged() {
root.cameraSelected(_reconstruction.selectedViewId)
}
}
function spawnCameraSelectors() { function spawnCameraSelectors() {
var validCameras = 0; var validCameras = 0;
// spawn camera selector for each camera // spawn camera selector for each camera