Merge pull request #2257 from alicevision/fix/displayResections

[Viewer3D] Bind the display status of the resection groups to QtAliceVision
This commit is contained in:
Fabien Castan 2023-11-21 22:14:04 +01:00 committed by GitHub
commit bb9195f995
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -100,7 +100,8 @@ import Utils 1.0
'pointSize': Qt.binding(function() { return 0.01 * Viewer3DSettings.pointSize }),
'locatorScale': Qt.binding(function() { return Viewer3DSettings.cameraScale }),
'cameraPickingEnabled': Qt.binding(function() { return root.enabled }),
'resectionId': Qt.binding(function() { return Viewer3DSettings.resectionId })
'resectionId': Qt.binding(function() { return Viewer3DSettings.resectionId }),
'displayResections': Qt.binding(function() { return Viewer3DSettings.displayResectionIds })
});
obj.statusChanged.connect(function() {

View file

@ -45,6 +45,7 @@ SfmDataEntity {
for (var i = 0; i < root.cameras.length; i++) {
var cam = root.cameras[i]
var resectionId = cam.resectionId
// 4294967295 = UINT_MAX, which might occur if the value is undefined on the C++ side
if (resectionId === undefined || resectionId === 4294967295)
continue
if (resectionId > maxResectionId)
@ -60,6 +61,7 @@ SfmDataEntity {
for (var i = 0; i < root.cameras.length; i++) {
var cam = root.cameras[i]
var resectionId = cam.resectionId
// 4294967295 = UINT_MAX, which might occur if the value is undefined on the C++ side
if (resectionId === undefined || resectionId === 4294967295)
continue
arr[resectionId] = arr[resectionId] + 1