Skip to content

Commit

Permalink
[ui] ImageGallery: Use commands to set SfM attributes through the gal…
Browse files Browse the repository at this point in the history
…lery

Prior to this commit, the `StructureFromMotion` and `SfMTransform` nodes'
were directly set without using the dedicated command. This meant that
the actions to set those attributes through the Image Gallery menu were
not added to the stack of commands, and could not be undone.
  • Loading branch information
cbentejac committed Oct 10, 2023
1 parent 11333e3 commit 557a5bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions meshroom/ui/qml/ImageGallery/ImageDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Item {
text: "Define As Center Image"
property var activeNode: _reconstruction ? _reconstruction.activeNodes.get("SfMTransform").node : null
enabled: !root.readOnly && _viewpoint.viewId != -1 && _reconstruction && activeNode
onClicked: activeNode.attribute("transformation").value = _viewpoint.viewId.toString()
onClicked: _reconstruction.setAttribute(activeNode.attribute("transformation"), _viewpoint.viewId.toString())
}
Menu {
id: sfmSetPairMenu
Expand All @@ -92,12 +92,12 @@ Item {

MenuItem {
text: "A"
onClicked: sfmSetPairMenu.activeNode.attribute("initialPairA").value = _viewpoint.viewId.toString()
onClicked: _reconstruction.setAttribute(sfmSetPairMenu.activeNode.attribute("initialPairA"), _viewpoint.viewId.toString())
}

MenuItem {
text: "B"
onClicked: sfmSetPairMenu.activeNode.attribute("initialPairB").value = _viewpoint.viewId.toString()
onClicked: _reconstruction.setAttribute(sfmSetPairMenu.activeNode.attribute("initialPairB"), _viewpoint.viewId.toString())
}
}
}
Expand Down

0 comments on commit 557a5bd

Please sign in to comment.