Skip to content

Commit

Permalink
Merge pull request #2627 from alicevision/fix/jsParamInjection
Browse files Browse the repository at this point in the history
[GraphEditor] Fix injections into signal handlers with JS functions
  • Loading branch information
fabiencastan authored Jan 6, 2025
2 parents f8f549a + cb301b2 commit e43cd62
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion meshroom/ui/qml/GraphEditor/AttributeItemDelegate.qml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ RowLayout {
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.AllButtons
onDoubleClicked: root.doubleClicked(mouse, root.attribute)
onDoubleClicked: function(mouse) { root.doubleClicked(mouse, root.attribute) }

property Component menuComp: Menu {
id: paramMenu
Expand Down
4 changes: 2 additions & 2 deletions meshroom/ui/qml/GraphEditor/NodeEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ Panel {
Layout.fillWidth: true
model: root.node.attributes
readOnly: root.readOnly || root.isCompatibilityNode
onAttributeDoubleClicked: root.attributeDoubleClicked(mouse, attribute)
onAttributeDoubleClicked: function(mouse, attribute) { root.attributeDoubleClicked(mouse, attribute) }
onUpgradeRequest: root.upgradeRequest()
filterText: searchBar.text
}
Expand Down Expand Up @@ -365,7 +365,7 @@ Panel {
Layout.fillWidth: true
model: root.node.internalAttributes
readOnly: root.readOnly || root.isCompatibilityNode
onAttributeDoubleClicked: root.attributeDoubleClicked(mouse, attribute)
onAttributeDoubleClicked: function(mouse, attribute) { root.attributeDoubleClicked(mouse, attribute) }
onUpgradeRequest: root.upgradeRequest()
filterText: searchBar.text
}
Expand Down
6 changes: 3 additions & 3 deletions meshroom/ui/qml/GraphEditor/ScriptEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Item {
ToolTip.text: "Execute Script"

onClicked: {
processScript()
root.processScript()
}
}

Expand Down Expand Up @@ -285,9 +285,9 @@ Item {
root.forceActiveFocus()
}

Keys.onPressed: {
Keys.onPressed: function(event) {
if ((event.key === Qt.Key_Enter || event.key === Qt.Key_Return) && event.modifiers === Qt.ControlModifier) {
processScript()
root.processScript()
}
}
}
Expand Down

0 comments on commit e43cd62

Please sign in to comment.