Skip to content

Commit

Permalink
#218 Event handlers cosmetic.
Browse files Browse the repository at this point in the history
Signed-off-by: cneben <benoit@destrat.io>
cneben committed Jan 9, 2024
1 parent 7d112df commit 5ab8eaa
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/NavigablePreview.qml
Original file line number Diff line number Diff line change
@@ -230,13 +230,13 @@ Qan.AbstractNavigablePreview {
updatePreview()
}
}
onClicked: {
onClicked: (mouse) => {
let p = mapToItem(preview, Qt.point(mouse.x, mouse.y))
viewWindowTimer.p = p
viewWindowTimer.start()
mouse.accepted = true
}
onDoubleClicked: {
onDoubleClicked: (mouse) => {
viewWindowTimer.stop()
let p = mapToItem(preview, Qt.point(mouse.x, mouse.y))
let sceneP = mapFromPreview(p)
2 changes: 1 addition & 1 deletion src/VisualConnector.qml
Original file line number Diff line number Diff line change
@@ -212,7 +212,7 @@ Qan.Connector {
if (edgeItem) // Hide the edgeItem after a mouse release or it could
edgeItem.visible = false // be visible on non rectangular nodes.
}
onPressed: function(mouse) {
onPressed: (mouse) => {
mouse.accepted = true
connectorPressed()
if (edgeItem)

0 comments on commit 5ab8eaa

Please sign in to comment.