Commit fdba4f9e authored by DonLakeFlyer's avatar DonLakeFlyer

Fix console spew from Qml complaints

parent 10215bbd
......@@ -31,7 +31,7 @@ Rectangle {
readonly property real _margins: ScreenTools.defaultFontPixelWidth
onMaxWidthChanged: {
var calcLength = (statusListView.count + 1)*statusListView.contentItem.children[0].width
var calcLength = (statusListView.count + 1) * (statusListView.count ? statusListView.contentItem.children[0].width : 1)
root.width = root.maxWidth > calcLength ? calcLength : root.maxWidth
}
......@@ -63,7 +63,7 @@ Rectangle {
currentIndex: _missionController.currentPlanViewIndex
onCountChanged: {
var calcLength = (statusListView.count + 1)*statusListView.contentItem.children[0].width
var calcLength = (statusListView.count + 1) * (statusListView.count ? statusListView.contentItem.children[0].width : 1)
root.width = root.maxWidth > calcLength ? calcLength : root.maxWidth
}
......
......@@ -15,7 +15,7 @@ import QGroundControl.Controllers 1.0
Rectangle {
id: valuesRect
width: availableWidth
height: deferedload.status == Loader.Ready ? (visible ? deferedload.item.height : 0) : 0
height: valuesColumn.height + (_margin * 2)
color: qgcPal.windowShadeDark
visible: missionItem.isCurrentItem
radius: _radius
......@@ -39,51 +39,19 @@ Rectangle {
readonly property string _firmwareLabel: qsTr("Firmware")
readonly property string _vehicleLabel: qsTr("Vehicle")
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
QGCPalette { id: qgcPal }
QGCFileDialogController { id: fileController }
Loader {
id: deferedload
active: valuesRect.visible
asynchronous: true
anchors.margins: _margin
anchors.left: valuesRect.left
anchors.right: valuesRect.right
anchors.top: valuesRect.top
sourceComponent: Component {
Item {
id: valuesItem
height: valuesColumn.height + (_margin * 2)
Column {
id: valuesColumn
anchors.margins: _margin
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
spacing: _margin
Loader {
anchors.left: parent.left
anchors.right: parent.right
sourceComponent: missionSettings
}
} // Column
} // Item
} // Component
} // Loader
Component {
id: missionSettings
Column {
id: valuesColumn
anchors.left: parent ? parent.left : undefined
anchors.right: parent ? parent.right : undefined
anchors.top: parent ? parent.top : undefined
spacing: _margin
Column {
anchors.left: parent.left
anchors.right: parent.right
......@@ -263,5 +231,4 @@ Rectangle {
}
}
} // Column
} // Deferred loader
} // Rectangle
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