diff --git a/src/MissionManager/SurveyMissionItem.cc b/src/MissionManager/SurveyMissionItem.cc index e9d63b832bcbccf7167b2455aca4a80e3b9cb50f..eb28e7ec78f02e00bafa01f7435642a3ea858df1 100644 --- a/src/MissionManager/SurveyMissionItem.cc +++ b/src/MissionManager/SurveyMissionItem.cc @@ -14,6 +14,8 @@ #include "QGCGeo.h" #include "QGroundControlQmlGlobal.h" #include "QGCQGeoCoordinate.h" +#include "SettingsManager.h" +#include "AppSettings.h" #include @@ -117,6 +119,11 @@ SurveyMissionItem::SurveyMissionItem(Vehicle* vehicle, QObject* parent) _turnaroundDistFact.setRawValue(5); } + // We override the grid altitude to the mission default + if (_manualGridFact.rawValue().toBool() || _fixedValueIsAltitudeFact.rawValue().toBool()) { + _gridAltitudeFact.setRawValue(qgcApp()->toolbox()->settingsManager()->appSettings()->defaultMissionItemAltitude()->rawValue()); + } + connect(&_gridSpacingFact, &Fact::valueChanged, this, &SurveyMissionItem::_generateGrid); connect(&_gridAngleFact, &Fact::valueChanged, this, &SurveyMissionItem::_generateGrid); connect(&_gridEntryLocationFact, &Fact::valueChanged, this, &SurveyMissionItem::_generateGrid); @@ -1361,6 +1368,7 @@ double SurveyMissionItem::_turnaroundDistance(void) const void SurveyMissionItem::applyNewAltitude(double newAltitude) { + _fixedValueIsAltitudeFact.setRawValue(true); _gridAltitudeFact.setRawValue(newAltitude); } diff --git a/src/PlanView/SimpleItemMapVisual.qml b/src/PlanView/SimpleItemMapVisual.qml index f78bcb46e9211167cbe0756de533a17d50743f4d..2677f6504bf828e1a8b9b90bf1aee9414c0ea218 100644 --- a/src/PlanView/SimpleItemMapVisual.qml +++ b/src/PlanView/SimpleItemMapVisual.qml @@ -121,6 +121,7 @@ Item { z: 2 label: object.abbreviation.length === 0 ? object.sequenceNumber : object.abbreviation.charAt(0) checked: object.isCurrentItem + child: true specifiesCoordinate: false onClicked: _root.clicked(object.sequenceNumber) diff --git a/src/PlanView/SurveyItemEditor.qml b/src/PlanView/SurveyItemEditor.qml index 7c49b509bd2201bef424ddd704421b86aea5f325..5f68e3dccdcfa2674edd1de43f3c6baa521b8a9f 100644 --- a/src/PlanView/SurveyItemEditor.qml +++ b/src/PlanView/SurveyItemEditor.qml @@ -214,6 +214,7 @@ Rectangle { onActivated: { if (index == _gridTypeManual) { missionItem.manualGrid.value = true + missionItem.fixedValueIsAltitude.value = true } else if (index == _gridTypeCustomCamera) { missionItem.manualGrid.value = false missionItem.camera.value = gridTypeCombo.textAt(index) diff --git a/src/QGCPalette.cc b/src/QGCPalette.cc index dd55443472eb98cbd33563b329ecc62f80b78aec..ec5ac8fa79e1a44e2e2f4aace3f5d8e01a3840a3 100644 --- a/src/QGCPalette.cc +++ b/src/QGCPalette.cc @@ -60,9 +60,11 @@ void QGCPalette::_buildMap(void) DECLARE_QGC_COLOR(primaryButton, "#585858", "#8cb3be", "#585858", "#8cb3be") DECLARE_QGC_COLOR(primaryButtonText, "#2c2c2c", "#000000", "#2c2c2c", "#000000") DECLARE_QGC_COLOR(textField, "#ffffff", "#ffffff", "#585858", "#ffffff") - DECLARE_QGC_COLOR(textFieldText, "#dedede", "#000000", "#2c2c2c", "#000000") + DECLARE_QGC_COLOR(textFieldText, "#808080", "#000000", "#bfbfbf", "#000000") DECLARE_QGC_COLOR(mapButton, "#585858", "#000000", "#585858", "#000000") DECLARE_QGC_COLOR(mapButtonHighlight, "#585858", "#be781c", "#585858", "#be781c") + DECLARE_QGC_COLOR(mapIndicator, "#585858", "#be781c", "#585858", "#be781c") + DECLARE_QGC_COLOR(mapIndicatorChild, "#585858", "#766043", "#585858", "#766043") DECLARE_QGC_COLOR(colorGreen, "#009431", "#009431", "#00e04b", "#00e04b") DECLARE_QGC_COLOR(colorOrange, "#b95604", "#b95604", "#de8500", "#de8500") DECLARE_QGC_COLOR(colorRed, "#ed3939", "#ed3939", "#f32836", "#f32836") diff --git a/src/QGCPalette.h b/src/QGCPalette.h index 1c47116b8db1f75186cd827ada587d18b926b84d..03a9f04b301e5a54d055b1f63c198799178c136c 100644 --- a/src/QGCPalette.h +++ b/src/QGCPalette.h @@ -89,6 +89,8 @@ public: DEFINE_QGC_COLOR(textFieldText, setTextFieldText) DEFINE_QGC_COLOR(mapButton, setMapButton) DEFINE_QGC_COLOR(mapButtonHighlight, setMapButtonHighlight) + DEFINE_QGC_COLOR(mapIndicator, setMapIndicator) + DEFINE_QGC_COLOR(mapIndicatorChild, setMapIndicatorChild) DEFINE_QGC_COLOR(mapWidgetBorderLight, setMapWidgetBorderLight) DEFINE_QGC_COLOR(mapWidgetBorderDark, setMapWidgetBorderDark) DEFINE_QGC_COLOR(brandingPurple, setBrandingPurple) diff --git a/src/QmlControls/MissionItemIndexLabel.qml b/src/QmlControls/MissionItemIndexLabel.qml index 2b226e4be58145799cdf1e15b9471016c6a60e0a..1393a35994a0ea1c8a7883056347256e308cd0d0 100644 --- a/src/QmlControls/MissionItemIndexLabel.qml +++ b/src/QmlControls/MissionItemIndexLabel.qml @@ -12,11 +12,12 @@ Canvas { signal clicked - property string label ///< Label to show to the side of the index indicator - property int index: 0 ///< Index to show in the indicator, 0 will show single char label instead, -1 first char of label in indicator full label to the side + property string label ///< Label to show to the side of the index indicator + property int index: 0 ///< Index to show in the indicator, 0 will show single char label instead, -1 first char of label in indicator full label to the side property bool checked: false property bool small: false - property var color: checked ? "green" : qgcPal.mapButtonHighlight + property bool child: false + property var color: checked ? "green" : (child ? qgcPal.mapIndicatorChild : qgcPal.mapIndicator) property real anchorPointX: _height / 2 property real anchorPointY: _height / 2 property bool specifiesCoordinate: true