Commit 039d61c0 authored by Don Gagne's avatar Don Gagne

Don't show current selection

Simpler this way
parent b17d704c
...@@ -49,7 +49,6 @@ QGCViewDialog { ...@@ -49,7 +49,6 @@ QGCViewDialog {
function categorySelected(category) { function categorySelected(category) {
commandList.model = QGroundControl.missionCommands.getCommandsForCategory(category) commandList.model = QGroundControl.missionCommands.getCommandsForCategory(category)
console.log("changing model", category)
} }
Component.onCompleted: { Component.onCompleted: {
...@@ -71,33 +70,13 @@ QGCViewDialog { ...@@ -71,33 +70,13 @@ QGCViewDialog {
spacing: ScreenTools.defaultFontPixelHeight / 2 spacing: ScreenTools.defaultFontPixelHeight / 2
orientation: ListView.Vertical orientation: ListView.Vertical
onModelChanged: {
var currentCategory = categoryCombo.currentText
currentIndex = -1
if (missionItem.category == currentCategory) {
var commandList = QGroundControl.missionCommands.getCommandsForCategory(currentCategory)
for (var i=0; i<commandList.count; i++) {
if (commandList.get(i).command == missionItem.command) {
currentIndex = i
break
}
}
}
}
highlight: Rectangle {
color: qgcPal.buttonHighlight
}
delegate: Rectangle { delegate: Rectangle {
width: parent.width width: parent.width
height: commandColumn.height + ScreenTools.defaultFontPixelSize height: commandColumn.height + ScreenTools.defaultFontPixelSize
color: currentItem ? qgcPal.buttonHighlight : qgcPal.button color: qgcPal.button
property var mavCmdInfo: object property var mavCmdInfo: object
property bool currentItem: commandList.currentItem == this property var textColor: qgcPal.buttonText
property var textColor: currentItem ? qgcPal.buttonHighlightText : qgcPal.buttonText
Column { Column {
id: commandColumn id: commandColumn
......
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