Unverified Commit d5f7442e authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8176 from DonLakeFlyer/SeqNum

MissionItemStatus: Show seq nums, clickable selection
parents 155d0d4b bfd6fccf
......@@ -26,8 +26,10 @@ Rectangle {
clip: true
property var missionItems ///< List of all available mission items
property real maxWidth: parent.width
signal setCurrentSeqNum(int seqNum)
readonly property real _margins: ScreenTools.defaultFontPixelWidth
onMaxWidthChanged: {
......@@ -97,7 +99,9 @@ Rectangle {
checked: object.isCurrentItem
label: object.abbreviation.charAt(0)
index: object.abbreviation.charAt(0) > 'A' && object.abbreviation.charAt(0) < 'z' ? -1 : object.sequenceNumber
showSequenceNumbers: true
visible: true
onClicked: root.setCurrentSeqNum(object.sequenceNumber)
}
}
}
......
......@@ -884,6 +884,8 @@ Item {
missionItems: _missionController.visualItems
visible: _internalVisible && _editingLayer === _layerMission && QGroundControl.corePlugin.options.showMissionStatus
onSetCurrentSeqNum: _missionController.setCurrentPlanViewSeqNum(seqNum, true)
property bool _internalVisible: false
function toggleVisible() {
......
......@@ -25,6 +25,7 @@ Canvas {
property real gimbalYaw
property real vehicleYaw
property bool showGimbalYaw: false
property bool showSequenceNumbers: false
property real _width: showGimbalYaw ? Math.max(_gimbalYawWidth, labelControl.visible ? labelControl.width : indicator.width) : (labelControl.visible ? labelControl.width : indicator.width)
property real _height: showGimbalYaw ? _gimbalYawWidth : (labelControl.visible ? labelControl.height : indicator.height)
......@@ -37,7 +38,7 @@ Canvas {
property real _labelMargin: 2
property real _labelRadius: _indicatorRadius + _labelMargin
property string _label: label.length > 1 ? label : ""
property string _index: index === 0 || index === -1 ? label.charAt(0) : "" /*index*/
property string _index: index === 0 || index === -1 ? label.charAt(0) : (showSequenceNumbers ? index : "")
onColorChanged: requestPaint()
onShowGimbalYawChanged: requestPaint()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment