[ui] Update active CameraInit's index when loading a LdrToHdrMerge node

If a LdrToHdrMerge node does not belong to the active group but is set as
active (by loading it with a double-click), if it is connected to another
CameraInit node, and if the "Visualize HDR images" has been enabled, then
the active group should be updated to that other CameraInit node.

By updating the active CameraInit's index, not only will the Image Gallery
display the newly selected LdrToHdrMerge thumbnails (already working prior
to this commit), but the Viewer2D will also be updated to reflect the
Gallery's selected thumbnail correctly. Information provided by the Gallery
will also reflect its content, as the active group will correspond to the
shown images, which was not the case before.
This commit is contained in:
Candice Bentéjac 2023-03-10 18:40:49 +01:00
parent 4b6bd34268
commit 4001c4fc3e

View file

@ -599,6 +599,9 @@ class Reconstruction(UIGraph):
views, intrinsics = nodeDesc.readSfMData(sfmFile)
tmpCameraInit = Node("CameraInit", viewpoints=views, intrinsics=intrinsics)
self.tempCameraInit = tmpCameraInit
rootNode = self.graph.dfsOnFinish([node])[0][0]
if rootNode.nodeType == "CameraInit":
self.setCameraInitIndex(self._cameraInits.indexOf(rootNode))
@Slot(QObject, result=QVector3D)
def getAutoFisheyeCircle(self, panoramaInit):