Browse Source

Merge pull request #7750 from DonLakeFlyer/PlanItemNumbers

Plan: Hide sequence numbers
QGC4.4
Don Gagne 6 years ago committed by GitHub
parent
commit
4cc1689a61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      src/PlanView/MissionItemEditor.qml
  2. 2
      src/QmlControls/MissionItemIndexLabel.qml

32
src/PlanView/MissionItemEditor.qml

@ -70,6 +70,8 @@ Rectangle { @@ -70,6 +70,8 @@ Rectangle {
}
}
/*
Trying no sequence numbers in ui
QGCLabel {
id: label
anchors.verticalCenter: commandPicker.verticalCenter
@ -77,7 +79,7 @@ Rectangle { @@ -77,7 +79,7 @@ Rectangle {
anchors.left: parent.left
text: missionItem.homePosition ? "P" : missionItem.sequenceNumber
color: _outerTextColor
}
}*/
QGCColoredImage {
id: hamburger
@ -172,15 +174,28 @@ Rectangle { @@ -172,15 +174,28 @@ Rectangle {
checked = missionItem.rawEdit
}
}
QGCMenuItem {
text: qsTr("Item #%1").arg(missionItem.sequenceNumber)
enabled: false
}
}
}
QGCButton {
id: commandPicker
anchors.topMargin: _margin / 2
anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
anchors.rightMargin: ScreenTools.defaultFontPixelWidth
anchors.leftMargin: _margin
anchors.left: parent.left
/*
Trying no sequence numbers in ui
anchors.leftMargin: ScreenTools.defaultFontPixelWidth * 2
anchors.left: label.right
*/
anchors.top: parent.top
visible: !commandLabel.visible
text: missionItem.commandName
@ -197,12 +212,13 @@ Rectangle { @@ -197,12 +212,13 @@ Rectangle {
}
QGCLabel {
id: commandLabel
anchors.fill: commandPicker
visible: !missionItem.isCurrentItem || !missionItem.isSimpleItem || _waypointsOnlyMode
verticalAlignment: Text.AlignVCenter
text: missionItem.commandName
color: _outerTextColor
id: commandLabel
anchors.fill: commandPicker
visible: !missionItem.isCurrentItem || !missionItem.isSimpleItem || _waypointsOnlyMode
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: missionItem.commandName
color: _outerTextColor
}
Loader {

2
src/QmlControls/MissionItemIndexLabel.qml

@ -35,7 +35,7 @@ Canvas { @@ -35,7 +35,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) : ""/*index*/
onColorChanged: requestPaint()
onShowGimbalYawChanged: requestPaint()

Loading…
Cancel
Save