Unverified Commit 299fde42 authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #6152 from mavlink/qmlFixes

QML fixes
parents 61cc29df 0f944190
......@@ -110,7 +110,7 @@ AnalyzePage {
}
QGCLabel {
text: geoController.saveDirectory != "" ? geoController.saveDirectory : "/TAGGED folder in your image folder"
text: geoController.saveDirectory !== "" ? geoController.saveDirectory : "/TAGGED folder in your image folder"
anchors.verticalCenter: parent.verticalCenter
}
}
......
......@@ -55,7 +55,7 @@ SetupPage {
property real _lastValue: 0
onTriggered: {
if (_lastValue != slider.value) {
if (_lastValue !== slider.value) {
controller.vehicle.motorTest(index + 1, slider.value, 1)
}
}
......
......@@ -379,7 +379,7 @@ SetupPage {
text: qsTr("Calibrate")
onClicked: {
if (text == qsTr("Calibrate")) {
if (text === qsTr("Calibrate")) {
showDialog(zeroTrimsDialogComponent, dialogTitle, radioPage.showDialogDefaultWidth, StandardButton.Ok | StandardButton.Cancel)
} else {
controller.nextButtonClicked()
......
......@@ -202,12 +202,12 @@ Your vehicle will also be restarted in order to complete the process.")
QGCCheckBox {
// Although this item is invisible we still use it to manage state
id: airframeCheckBox
checked: modelData.name == controller.currentAirframeType
checked: modelData.name === controller.currentAirframeType
exclusiveGroup: airframeTypeExclusive
visible: false
onCheckedChanged: {
if (checked && combo.currentIndex != -1) {
if (checked && combo.currentIndex !== -1) {
console.log("check box change", combo.currentIndex)
controller.autostartId = modelData.airframes[combo.currentIndex].autostartId
}
......
......@@ -37,7 +37,7 @@ FactPanel {
VehicleSummaryRow {
labelText: qsTr("Firmware Version:")
valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + activeVehicle.firmwareVersionTypeString
valueText: activeVehicle.firmwareMajorVersion === -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + activeVehicle.firmwareVersionTypeString
}
}
}
......@@ -18,7 +18,7 @@ FactPanel {
property Fact _nullFact
property Fact _rcMapFltmode: controller.parameterExists(-1, "RC_MAP_FLTMODE") ? controller.getParameterFact(-1, "RC_MAP_FLTMODE") : _nullFact
property Fact _rcMapModeSw: controller.getParameterFact(-1, "RC_MAP_MODE_SW")
property bool _simpleMode: _rcMapFltmode.value > 0 || _rcMapModeSw.value == 0
property bool _simpleMode: _rcMapFltmode.value > 0 || _rcMapModeSw.value === 0
Loader {
anchors.fill: parent
......
......@@ -39,7 +39,7 @@ SetupPage {
property bool _rcMapFltmodeExists: controller.parameterExists(-1, "RC_MAP_FLTMODE")
property Fact _rcMapFltmode: _rcMapFltmodeExists ? controller.getParameterFact(-1, "RC_MAP_FLTMODE") : _nullFact
property Fact _rcMapModeSw: controller.getParameterFact(-1, "RC_MAP_MODE_SW")
property bool _simpleMode: _rcMapFltmodeExists ? _rcMapFltmode.value > 0 || _rcMapModeSw.value == 0 : false
property bool _simpleMode: _rcMapFltmodeExists ? _rcMapFltmode.value > 0 || _rcMapModeSw.value === 0 : false
FactPanelController {
id: controller
......
......@@ -145,7 +145,7 @@ Item {
QGCLabel {
anchors.baseline: returnCombo.baseline
text: qsTr("Return switch:")
color: parent.fact.value == 0 ? qgcPal.text : (controller.rcChannelValues[parent.fact.value - 1] >= 1500 ? "yellow" : qgcPal.text)
color: parent.fact.value === 0 ? qgcPal.text : (controller.rcChannelValues[parent.fact.value - 1] >= 1500 ? "yellow" : qgcPal.text)
}
FactComboBox {
......@@ -164,7 +164,7 @@ Item {
QGCLabel {
anchors.baseline: killCombo.baseline
text: qsTr("Kill switch:")
color: parent.fact.value == 0 ? qgcPal.text : (controller.rcChannelValues[parent.fact.value - 1] >= 1500 ? "yellow" : qgcPal.text)
color: parent.fact.value === 0 ? qgcPal.text : (controller.rcChannelValues[parent.fact.value - 1] >= 1500 ? "yellow" : qgcPal.text)
}
FactComboBox {
......@@ -183,7 +183,7 @@ Item {
QGCLabel {
anchors.baseline: offboardCombo.baseline
text: qsTr("Offboard switch:")
color: parent.fact.value == 0 ? qgcPal.text : (controller.rcChannelValues[parent.fact.value - 1] >= 1500 ? "yellow" : qgcPal.text)
color: parent.fact.value === 0 ? qgcPal.text : (controller.rcChannelValues[parent.fact.value - 1] >= 1500 ? "yellow" : qgcPal.text)
}
FactComboBox {
......@@ -203,7 +203,7 @@ Item {
QGCLabel {
anchors.baseline: vtolCombo.baseline
text: qsTr("VTOL mode switch:")
color: parent.fact.value == 0 ? qgcPal.text : (controller.rcChannelValues[parent.fact.value - 1] >= 1500 ? "yellow" : qgcPal.text)
color: parent.fact.value === 0 ? qgcPal.text : (controller.rcChannelValues[parent.fact.value - 1] >= 1500 ? "yellow" : qgcPal.text)
}
FactComboBox {
......
......@@ -143,7 +143,7 @@ SetupPage {
onClicked: {
var measuredVoltageValue = parseFloat(measuredVoltage.text)
if (measuredVoltageValue == 0 || isNaN(measuredVoltageValue)) {
if (measuredVoltageValue === 0 || isNaN(measuredVoltageValue)) {
return
}
var newVoltageDivider = (measuredVoltageValue * battVoltageDivider.value) / controller.vehicle.battery.voltage.value
......@@ -201,7 +201,7 @@ SetupPage {
onClicked: {
var measuredCurrentValue = parseFloat(measuredCurrent.text)
if (measuredCurrentValue == 0) {
if (measuredCurrentValue === 0) {
return
}
var newAmpsPerVolt = (measuredCurrentValue * battAmpsPerVolt.value) / controller.vehicle.battery.current.value
......@@ -379,7 +379,7 @@ SetupPage {
QGCCheckBox {
id: showUAVCAN
text: qsTr("Show UAVCAN Settings")
checked: uavcanEnable.rawValue != 0
checked: uavcanEnable ? uavcanEnable.rawValue !== 0 : false
}
QGCGroupBox {
......
......@@ -25,8 +25,8 @@ FactPanel {
property Fact airspeedDisabledFact: controller.getParameterFact(-1, "FW_ARSP_MODE")
property Fact airspeedBreakerFact: controller.getParameterFact(-1, "CBRK_AIRSPD_CHK")
property bool _airspeedVisible: airspeedDisabledFact.value == false && airspeedBreakerFact.value != 162128
property bool _airspeedCalRequired: _airspeedVisible && dpressOffFact.value == 0
property bool _airspeedVisible: airspeedDisabledFact.value === false && airspeedBreakerFact.value !== 162128
property bool _airspeedCalRequired: _airspeedVisible && dpressOffFact.value === 0
Column {
anchors.fill: parent
......
......@@ -352,7 +352,7 @@ Item {
id: compassButton
width: _buttonWidth
text: qsTr("Compass")
indicatorGreen: cal_mag0_id.value != 0
indicatorGreen: cal_mag0_id.value !== 0
visible: QGroundControl.corePlugin.options.showSensorCalibrationCompass && showSensorCalibrationCompass
onClicked: {
......@@ -366,7 +366,7 @@ Item {
id: gyroButton
width: _buttonWidth
text: qsTr("Gyroscope")
indicatorGreen: cal_gyro0_id.value != 0
indicatorGreen: cal_gyro0_id.value !== 0
visible: QGroundControl.corePlugin.options.showSensorCalibrationGyro && showSensorCalibrationGyro
onClicked: {
......@@ -380,7 +380,7 @@ Item {
id: accelButton
width: _buttonWidth
text: qsTr("Accelerometer")
indicatorGreen: cal_acc0_id.value != 0
indicatorGreen: cal_acc0_id.value !== 0
visible: QGroundControl.corePlugin.options.showSensorCalibrationAccel && showSensorCalibrationAccel
onClicked: {
......@@ -394,8 +394,8 @@ Item {
id: levelButton
width: _buttonWidth
text: qsTr("Level Horizon")
indicatorGreen: sens_board_x_off.value != 0 || sens_board_y_off.value != 0 | sens_board_z_off.value != 0
enabled: cal_acc0_id.value != 0 && cal_gyro0_id.value != 0
indicatorGreen: sens_board_x_off.value !== 0 || sens_board_y_off.value !== 0 | sens_board_z_off.value !== 0
enabled: cal_acc0_id.value !== 0 && cal_gyro0_id.value !== 0
visible: QGroundControl.corePlugin.options.showSensorCalibrationLevel && showSensorCalibrationLevel
onClicked: {
......@@ -410,11 +410,11 @@ Item {
width: _buttonWidth
text: qsTr("Airspeed")
visible: (controller.vehicle.fixedWing || controller.vehicle.vtol) &&
controller.getParameterFact(-1, "FW_ARSP_MODE").value == false &&
controller.getParameterFact(-1, "CBRK_AIRSPD_CHK").value != 162128 &&
controller.getParameterFact(-1, "FW_ARSP_MODE").value === false &&
controller.getParameterFact(-1, "CBRK_AIRSPD_CHK").value !== 162128 &&
QGroundControl.corePlugin.options.showSensorCalibrationAirspeed &&
showSensorCalibrationAirspeed
indicatorGreen: sens_dpres_off.value != 0
indicatorGreen: sens_dpres_off.value !== 0
onClicked: {
preCalibrationDialogType = "airspeed"
......
......@@ -33,10 +33,12 @@ Flow {
checked: fact.value & fact.bitmaskValues[index]
onClicked: {
var i;
var otherCheckbox;
if (checked) {
if (firstEntryIsAll && index == 0) {
for (var i=1; i<repeater.count; i++) {
var otherCheckbox = repeater.itemAt(i)
for (i = 1; i < repeater.count; i++) {
otherCheckbox = repeater.itemAt(i)
fact.value &= ~fact.bitmaskValues[i]
otherCheckbox.checked = false
otherCheckbox.enabled = false
......@@ -45,8 +47,8 @@ Flow {
fact.value |= fact.bitmaskValues[index]
} else {
if (firstEntryIsAll && index == 0) {
for (var i=1; i<repeater.count; i++) {
var otherCheckbox = repeater.itemAt(i)
for (i = 1; i < repeater.count; i++) {
otherCheckbox = repeater.itemAt(i)
otherCheckbox.enabled = true
}
}
......
......@@ -8,16 +8,14 @@ import QGroundControl.Controls 1.0
QGCCheckBox {
property Fact fact: Fact { }
property variant checkedValue: 1
property variant uncheckedValue: 0
checkedState: fact ?
(fact.typeIsBool ?
(fact.value === true ? Qt.Checked : Qt.Unchecked) :
(fact.value === checkedValue ? Qt.Checked : Qt.Unchecked)) :
(fact.value === false ? Qt.Unchecked : Qt.Checked) :
(fact.value === 0 ? Qt.Unchecked : Qt.Checked)) :
Qt.Unchecked
text: qsTr("Label")
onClicked: fact.value = checked ? checkedValue : uncheckedValue
onClicked: fact.value = checked ? 1 : 0
}
......@@ -12,7 +12,7 @@ QGCComboBox {
model: fact ? fact.enumStrings : null
currentIndex: indexModel ? fact.value : fact.enumIndex
currentIndex: fact ? (indexModel ? fact.value : fact.enumIndex) : 0
onActivated: {
if (indexModel) {
......
......@@ -32,7 +32,7 @@ QGCTextField {
}
if (typeof qgcView !== 'undefined' && qgcView) {
var errorString = fact.validate(text, false /* convertOnly */)
if (errorString == "") {
if (errorString === "") {
fact.value = text
} else {
_validateString = text
......
......@@ -143,7 +143,7 @@ FlightMap {
onNewItemsFromVehicle: {
var visualItems = _missionController.visualItems
if (visualItems && visualItems.count != 1) {
if (visualItems && visualItems.count !== 1) {
mapFitFunctions.fitMapViewportToMissionItems()
firstVehiclePositionReceived = true
}
......
......@@ -72,7 +72,7 @@ Item {
instrumentsLoader.state = "topMode"
} else {
instrumentsLoader.source = "qrc:/qml/QGCInstrumentWidget.qml"
instrumentsLoader.state = QGroundControl.settingsManager.appSettings.showLargeCompass.value == 1 ? "centerMode" : "topMode"
instrumentsLoader.state = QGroundControl.settingsManager.appSettings.showLargeCompass.value === 1 ? "centerMode" : "topMode"
}
}
} else {
......
......@@ -313,6 +313,8 @@ Item {
// Executes the specified action
function executeAction(actionCode, actionData) {
var i;
var rgVehicle;
switch (actionCode) {
case actionRTL:
_activeVehicle.guidedModeRTL()
......@@ -336,10 +338,9 @@ Item {
_activeVehicle.startMission()
break
case actionMVStartMission:
var rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (var i=0; i<rgVehicle.count; i++) {
var vehicle = rgVehicle.get(i)
vehicle.startMission()
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).startMission()
}
break
case actionArm:
......@@ -370,10 +371,9 @@ Item {
_activeVehicle.pauseVehicle()
break
case actionMVPause:
var rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (var i=0; i<rgVehicle.count; i++) {
var vehicle = rgVehicle.get(i)
vehicle.pauseVehicle()
rgVehicle = QGroundControl.multiVehicleManager.vehicles
for (i = 0; i < rgVehicle.count; i++) {
rgVehicle.get(i).pauseVehicle()
}
break
case actionVtolTransitionToFwdFlight:
......
......@@ -152,7 +152,7 @@ Item {
QGCButton {
text: "Start Mission"
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.missionFlightMode
visible: _vehicle.armed && _vehicle.flightMode !== _vehicle.missionFlightMode
onClicked: _vehicle.startMission()
}
......@@ -164,13 +164,13 @@ Item {
QGCButton {
text: "RTL"
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.rtlFlightMode
visible: _vehicle.armed && _vehicle.flightMode !== _vehicle.rtlFlightMode
onClicked: _vehicle.flightMode = _vehicle.rtlFlightMode
}
QGCButton {
text: "Take control"
visible: _vehicle.armed && _vehicle.flightMode != _vehicle.takeControlFlightMode
visible: _vehicle.armed && _vehicle.flightMode !== _vehicle.takeControlFlightMode
onClicked: _vehicle.flightMode = _vehicle.takeControlFlightMode
}
} // Row
......
......@@ -29,9 +29,9 @@ Item {
Component.onCompleted: {
var controlUrl = object.url
if (controlUrl != "") {
if (controlUrl !== "") {
var component = Qt.createComponent(controlUrl);
if (component.status == Component.Ready) {
if (component.status === Component.Ready) {
_customObject = component.createObject(map, { "customMapObject": object })
if (_customObject) {
map.addMapItem(_customObject)
......
......@@ -233,7 +233,7 @@ Item {
var clickCoordinate = map.toCoordinate(Qt.point(mouse.x, mouse.y), false /* clipToViewPort */)
var polygonPath = _newPolygon.path
if (polygonPath.length == 0) {
if (polygonPath.length === 0) {
// Add first coordinate
polygonPath.push(clickCoordinate)
} else {
......@@ -252,10 +252,10 @@ Item {
_currentPolygon.path = polygonPath
_newPolygon.path = polygonPath
if (_mobile && _currentPolygon.path.length == 1) {
if (_mobile && _currentPolygon.path.length === 1) {
_mobilePoint.coordinate = _currentPolygon.path[0]
_mobilePoint.visible = true
} else if (_mobile && _currentPolygon.path.length == 2) {
} else if (_mobile && _currentPolygon.path.length === 2) {
// Show initial line segment on mobile
_mobileSegment.path = [ _currentPolygon.path[0], _currentPolygon.path[1] ]
_mobileSegment.visible = true
......
......@@ -115,7 +115,7 @@ Item {
var rightCoord = mapControl.toCoordinate(Qt.point(scaleLinePixelLength, scale.y), false /* clipToViewPort */)
var scaleLineMeters = Math.round(leftCoord.distanceTo(rightCoord))
if (QGroundControl.settingsManager.unitsSettings.distanceUnits.value == UnitsSettings.DistanceUnitsFeet) {
if (QGroundControl.settingsManager.unitsSettings.distanceUnits.value === UnitsSettings.DistanceUnitsFeet) {
calculateFeetRatio(scaleLineMeters, scaleLinePixelLength)
} else {
calculateMetersRatio(scaleLineMeters, scaleLinePixelLength)
......
......@@ -61,7 +61,7 @@ DropButton {
/// Fits the visible region of the map to inclues all of the specified coordinates. If no coordinates
/// are specified the map will center to fitHomePosition()
function fitMapViewportToAllCoordinates(coordList) {
if (coordList.length == 0) {
if (coordList.length === 0) {
map.center = fitHomePosition()
return
}
......@@ -115,16 +115,17 @@ DropButton {
}
function addFenceItemCoordsForFit(coordList) {
var i
var homePosition = fitHomePosition()
if (homePosition.isValid && geoFenceController.circleEnabled) {
var azimuthList = [ 0, 180, 90, 270 ]
for (var i=0; i<azimuthList.length; i++) {
for (i = 0; i < azimuthList.length; i++) {
var edgeCoordinate = homePosition.atDistanceAndAzimuth(geoFenceController.circleRadius, azimuthList[i])
coordList.push(edgeCoordinate)
}
}
if (geoFenceController.polygonEnabled && geoFenceController.polygon.count() > 2) {
for (var i=0; i<geoFenceController.polygon.count(); i++) {
for (i = 0; i < geoFenceController.polygon.count(); i++) {
coordList.push(geoFenceController.polygon.path[i])
}
}
......
......@@ -49,7 +49,7 @@ Item {
/// are specified the map will center to fitHomePosition()
function fitMapViewportToAllCoordinates(coordList) {
var mapFitViewport = Qt.rect(0, 0, map.width, map.height)
if (coordList.length == 0) {
if (coordList.length === 0) {
var homeCoord = fitHomePosition()
if (homeCoord.isValid) {
map.center = homeCoord
......@@ -113,16 +113,17 @@ Item {
}
function addFenceItemCoordsForFit(coordList) {
var i
var homePosition = fitHomePosition()
if (homePosition.isValid && _geoFenceController.circleEnabled) {
var azimuthList = [ 0, 180, 90, 270 ]
for (var i=0; i<azimuthList.length; i++) {
for (i = 0; i < azimuthList.length; i++) {
var edgeCoordinate = homePosition.atDistanceAndAzimuth(_geoFenceController.circleRadius, azimuthList[i])
coordList.push(edgeCoordinate)
}
}
if (_geoFenceController.polygonEnabled && _geoFenceController.mapPolygon.path.count > 2) {
for (var i=0; i<_geoFenceController.mapPolygon.path.count; i++) {
for (i = 0; i < _geoFenceController.mapPolygon.path.count; i++) {
coordList.push(_geoFenceController.mapPolygon.path[i])
}
}
......
......@@ -174,8 +174,8 @@ Column {
anchors.right: parent.right
sourceComponent: factGroupList
property var factGroup: _activeVehicle
property var factGroupName: "Vehicle"
property var factGroup: _activeVehicle
property string factGroupName: "Vehicle"
}
}
}
......
......@@ -39,7 +39,7 @@ Column {
}
gridTypeCombo.model = _cameraList
var knownCameraIndex = gridTypeCombo.find(cameraCalc.cameraName)
if (knownCameraIndex != -1) {
if (knownCameraIndex !== -1) {
gridTypeCombo.currentIndex = knownCameraIndex
} else {
console.log("Internal error: Known camera not found", cameraCalc.cameraName)
......
......@@ -46,7 +46,7 @@ Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelWidth
visible: _camera.cameraAction.rawValue == 1
visible: _camera.cameraAction.rawValue === 1
QGCLabel {
text: qsTr("Time")
......@@ -62,7 +62,7 @@ Column {
anchors.left: parent.left
anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelWidth
visible: _camera.cameraAction.rawValue == 2
visible: _camera.cameraAction.rawValue === 2
QGCLabel {
text: qsTr("Distance")
......
......@@ -154,7 +154,7 @@ QGCFlickable {
QGCLabel {
text: qsTr("None")
visible: polygonSection.checked && myGeoFenceController.polygons.count == 0
visible: polygonSection.checked && myGeoFenceController.polygons.count === 0
}
GridLayout {
......@@ -239,7 +239,7 @@ QGCFlickable {
QGCLabel {
text: qsTr("None")
visible: circleSection.checked && myGeoFenceController.circles.count == 0
visible: circleSection.checked && myGeoFenceController.circles.count === 0
}
GridLayout {
......
......@@ -89,7 +89,7 @@ Rectangle {
height: _hamburgerSize
sourceSize.height: _hamburgerSize
source: "qrc:/qmlimages/Hamburger.svg"
visible: missionItem.isCurrentItem && missionItem.sequenceNumber != 0
visible: missionItem.isCurrentItem && missionItem.sequenceNumber !== 0
color: qgcPal.windowShade
}
......
......@@ -32,13 +32,13 @@ Rectangle {
property real missionMaxTelemetry: _controllerValid ? planMasterController.missionController.missionMaxTelemetry : NaN
property bool missionDirty: _controllerValid ? planMasterController.missionController.dirty : false
property bool _controllerValid: planMasterController != undefined
property bool _controllerValid: planMasterController !== undefined
property bool _controllerOffline: _controllerValid ? planMasterController.offline : true
property var _controllerDirty: _controllerValid ? planMasterController.dirty : false
property var _controllerSyncInProgress: _controllerValid ? planMasterController.syncInProgress : false
property bool _statusValid: currentMissionItem != undefined
property bool _missionValid: missionItems != undefined
property bool _statusValid: currentMissionItem !== undefined
property bool _missionValid: missionItems !== undefined
property real _dataFontSize: ScreenTools.defaultFontPointSize
property real _largeValueWidth: ScreenTools.defaultFontPixelWidth * 8
......
......@@ -238,7 +238,7 @@ QGCView {
QGCFileDialog {
id: fileDialog
qgcView: _qgcView
property var plan: true
property bool plan: true
folder: QGroundControl.settingsManager.appSettings.missionSavePath
fileExtension: QGroundControl.settingsManager.appSettings.planFileExtension
fileExtension2: QGroundControl.settingsManager.appSettings.missionFileExtension
......@@ -263,7 +263,7 @@ QGCView {
function accept() {
var toIndex = toCombo.currentIndex
if (toIndex == 0) {
if (toIndex === 0) {
toIndex = 1
}
_missionController.moveMissionItem(_moveDialogMissionItemIndex, toIndex)
......
......@@ -17,7 +17,7 @@ Rectangle {
property var rallyPoint ///< RallyPoint object associated with editor
property var controller ///< RallyPointController
property bool _currentItem: rallyPoint ? rallyPoint == controller.currentRallyPoint : false
property bool _currentItem: rallyPoint ? rallyPoint === controller.currentRallyPoint : false
property color _outerTextColor: _currentItem ? "black" : qgcPal.text
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
......
......@@ -45,7 +45,7 @@ Item {
MissionItemIndicatorDrag {
itemCoordinate: rallyPointObject.coordinate
visible: rallyPointObject == myRallyPointController.currentRallyPoint
visible: rallyPointObject === myRallyPointController.currentRallyPoint
property var rallyPointObject
......@@ -67,7 +67,7 @@ Item {
sourceItem: MissionItemIndexLabel {
id: itemIndexLabel
label: qsTr("R", "rally point map item label")
checked: _editingLayer == _layerRallyPoints ? rallyPointObject == myRallyPointController.currentRallyPoint : false
checked: _editingLayer == _layerRallyPoints ? rallyPointObject === myRallyPointController.currentRallyPoint : false
onClicked: myRallyPointController.currentRallyPoint = rallyPointObject
}
......
......@@ -44,7 +44,7 @@ Rectangle {
QGCLabel {
text: object.name
visible: object.name != ""
visible: object.name !== ""
Layout.column: 0
Layout.row: index
}
......
......@@ -46,7 +46,7 @@ Rectangle {
} else {
var index = -1
for (index=0; index<_cameraList.length; index++) {
if (_cameraList[index] == missionItem.camera.value) {
if (_cameraList[index] === missionItem.camera.value) {
break;
}
}
......@@ -243,7 +243,7 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
spacing: _margin
visible: missionItem.manualGrid.value == true
visible: missionItem.manualGrid.value
QGCCheckBox {
id: cameraTriggerDistanceCheckBox
......@@ -273,7 +273,7 @@ Rectangle {
anchors.left: parent.left
anchors.right: parent.right
spacing: _margin
visible: gridTypeCombo.currentIndex != _gridTypeManual
visible: gridTypeCombo.currentIndex !== _gridTypeManual
Row {
spacing: _margin
......@@ -443,7 +443,7 @@ Rectangle {
id: windRoseButton
anchors.verticalCenter: angleText.verticalCenter
iconSource: qgcPal.globalTheme === QGCPalette.Light ? "/res/wind-roseBlack.svg" : "/res/wind-rose.svg"
visible: _vehicle.fixedWing
visible: _vehicle ? _vehicle.fixedWing : false
onClicked: {
windRosePie.angle = Number(gridAngleText.text)
......@@ -522,7 +522,7 @@ Rectangle {
SectionHeader {
id: manualGridHeader
text: qsTr("Grid")
visible: gridTypeCombo.currentIndex == _gridTypeManual
visible: gridTypeCombo.currentIndex === _gridTypeManual
}
GridLayout {
......@@ -547,7 +547,7 @@ Rectangle {
anchors.verticalCenter: manualAngleText.verticalCenter
Layout.columnSpan: 1
iconSource: qgcPal.globalTheme === QGCPalette.Light ? "/res/wind-roseBlack.svg" : "/res/wind-rose.svg"
visible: _vehicle.fixedWing
visible: _vehicle ? _vehicle.fixedWing : false
onClicked: {
var cords = manualWindRoseButton.mapToItem(_root, 0, 0)
......
......@@ -90,6 +90,7 @@ Item {
QGCMapPolygonVisuals {
id: mapPolygonVisuals
qgcView: _root.qgcView
mapControl: map
mapPolygon: _mapPolygon
interactive: _missionItem.isCurrentItem
......
......@@ -175,9 +175,9 @@ Item {
id: arrowCanvas
anchors.fill: parent
property var arrowPoint: Qt.point(0, 0)
property var arrowBase1: Qt.point(0, 0)
property var arrowBase2: Qt.point(0, 0)
property point arrowPoint: Qt.point(0, 0)
property point arrowBase1: Qt.point(0, 0)