[ui] Image Gallery: Fix the display of the intrinsics table with temporary CameraInit nodes #1934
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When a temporary
CameraInit
node was created, its intrinsics (set to be identical to the currently activeCameraInit
node) were not parsed and the intrinsics table was not updated with them. This issue was not visible if there was a singleCameraInit
node in the graph, as its intrinsics were still displayed, making it seem like the intrinsics were those of the temporaryCameraInit
node.However, when there were several
CameraInit
groups, switching from one group's temporaryCameraInit
node to another's would generate a QML error and cause the intrinsics table to be empty.This PR addresses this issue by correctly parsing the intrinsics when temporary
CameraInit
nodes are created, thus correctly filling the intrinsics table at all times.It also handles an issue that was directly caused by this fix: since temporary
CameraInit
nodes are not part of the graph, they cannot be edited, and attempting to edit a temporaryCameraInit
's intrinsics from the table would cause errors.To prevent this from happening, temporary
CameraInit
nodes are set aslocked
upon their creation, and the intrinsics table goes in read-only mode when the intrinsics of such a node are displayed. Since nodes are automaticallylocked
while they are involved in computations, this also prevents any edit to the intrinsics ofCameraInit
nodes in that context.Finally, three minor changes were made:
Features list
locked
.