Browse Source

Add support to pass click position through signal

QGC4.4
Don Gagne 1 year ago committed by Julian Oes
parent
commit
e1d4b61c20
No known key found for this signature in database
GPG Key ID: F0ED380FEA56DE41
  1. 6
      src/QmlControls/MissionItemIndexLabel.qml

6
src/QmlControls/MissionItemIndexLabel.qml

@ -10,7 +10,7 @@ Canvas {
width: _width width: _width
height: _height height: _height
signal clicked signal clicked(point position)
property string label ///< Label to show to the side of the index indicator property string label ///< Label to show to the side of the index indicator
property int index: 0 ///< Index to show in the indicator, 0 will show single char label instead, -1 first char of label in indicator full label to the side property int index: 0 ///< Index to show in the indicator, 0 will show single char label instead, -1 first char of label in indicator full label to the side
@ -143,9 +143,9 @@ Canvas {
QGCMouseArea { QGCMouseArea {
fillItem: mouseAreaFill fillItem: mouseAreaFill
onClicked: { onClicked: (mouse) => {
focus = true focus = true
parent.clicked() parent.clicked(Qt.point(mouse.x, mouse.y))
} }
} }
} }

Loading…
Cancel
Save