Commit af054687 authored by Tomaz Canabrava's avatar Tomaz Canabrava

Clicking on the summary titles enter edit mode

Clicking on the sumarry titles enters the edit mode
On the tests with users, they always clicked on the
title (because it resembled a button or something) and
nothing happened. it was a bit confusing to have the
same information in two places and only one of them
being clickable.
Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent 1df62976
......@@ -38,6 +38,7 @@ import QGroundControl.MultiVehicleManager 1.0
Rectangle {
color: qgcPal.window
z: QGroundControl.zOrderTopMost
id: setupView
QGCPalette { id: qgcPal; colorGroupEnabled: true }
......@@ -110,6 +111,13 @@ Rectangle {
panelLoader.sourceComponent = messagePanelComponent
} else {
panelLoader.source = vehicleComponent.setupSource
for(var i = 0; i < componentRepeater.count; i++) {
var obj = componentRepeater.itemAt(i);
if (obj.text === vehicleComponent.name) {
obj.checked = true;
break;
}
}
}
}
}
......
......@@ -117,19 +117,11 @@ Rectangle {
readonly property real titleHeight: ScreenTools.defaultFontPixelHeight * 2
// Title bar
Rectangle {
QGCButton {
id: titleBar
width: parent.width
height: titleHeight
color: qgcPal.windowShade
// Title text
QGCLabel {
anchors.fill: parent
verticalAlignment: TextEdit.AlignVCenter
horizontalAlignment: TextEdit.AlignHCenter
text: capitalizeWords(modelData.name)
}
text: capitalizeWords(modelData.name)
// Setup indicator
Rectangle {
......@@ -142,6 +134,10 @@ Rectangle {
color: modelData.setupComplete ? "#00d932" : "red"
visible: modelData.requiresSetup
}
onClicked : {
setupView.showVehicleComponentPanel(modelData)
}
}
// Summary Qml
......
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