Commit 8fa51a24 authored by DonLakeFlyer's avatar DonLakeFlyer

Remove altitude mode warning which was causing recursion into dialog display...

Remove altitude mode warning which was causing recursion into dialog display and view switch problems
parent b2371899
......@@ -16,6 +16,10 @@ Note: This file only contains high level features or important fixes.
## 4.0.8 - Not yet released
* Fix bug which could prevent view switching from working after altitude mode warning dialog would pop up
## 4.0.8 - Stable
* iOS: Modify QGC file storage location to support new Files app
* Mobile: Fix Log Replay status bar file selection
......
......@@ -30,8 +30,7 @@ FactTextField {
readonly property string _altModeAboveTerrainExtraUnits: qsTr("(Abv Terr)")
readonly property string _altModeTerrainFrameExtraUnits: qsTr("(TerrF)")
property string _altitudeModeExtraUnits: _altModeNoneExtraUnits
property Fact _aboveTerrainWarning: QGroundControl.settingsManager.planViewSettings.aboveTerrainWarning
property string _altitudeModeExtraUnits: _altModeNoneExtraUnits
onAltitudeModeChanged: updateAltitudeModeExtraUnits()
......@@ -45,9 +44,6 @@ FactTextField {
_altitudeModeExtraUnits = _altModeAbsoluteExtraUnits
} else if (altitudeMode === QGroundControl.AltitudeModeAboveTerrain) {
_altitudeModeExtraUnits = _altModeAboveTerrainExtraUnits
if (!_aboveTerrainWarning.rawValue && showAboveTerrainWarning) {
mainWindow.showComponentDialog(aboveTerrainWarning, qsTr("Warning"), mainWindow.showDialogDefaultWidth, StandardButton.Ok)
}
} else if (missionItem.altitudeMode === QGroundControl.AltitudeModeTerrainFrame) {
_altitudeModeExtraUnits = _altModeTerrainFrameExtraUnits
} else {
......@@ -55,26 +51,4 @@ FactTextField {
_altitudeModeExtraUnits = ""
}
}
Component {
id: aboveTerrainWarning
QGCViewDialog {
ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: qsTr("'Above Terrain' will set an absolute altitude for the item based on the terrain height at the location and the requested altitude above terrain. It does not send terrain heights to the vehicle.")
}
FactCheckBox {
text: qsTr("Don't show again")
fact: _aboveTerrainWarning
}
}
}
}
}
......@@ -9,12 +9,6 @@
"type": "bool",
"defaultValue": false
},
{
"name": "aboveTerrainWarning",
"shortDescription": "Don't warn user about 'Above Terrain' usage",
"type": "bool",
"defaultValue": false
},
{
"name": "showMissionItemStatus",
"shortDescription": "Show/Hide the mission item status display",
......
......@@ -18,7 +18,6 @@ DECLARE_SETTINGGROUP(PlanView, "PlanView")
}
DECLARE_SETTINGSFACT(PlanViewSettings, displayPresetsTabFirst)
DECLARE_SETTINGSFACT(PlanViewSettings, aboveTerrainWarning)
DECLARE_SETTINGSFACT(PlanViewSettings, showMissionItemStatus)
DECLARE_SETTINGSFACT(PlanViewSettings, useConditionGate)
DECLARE_SETTINGSFACT(PlanViewSettings, takeoffItemNotRequired)
......
......@@ -21,7 +21,6 @@ public:
// Most individual settings related to PlanView are still in AppSettings due to historical reasons.
DEFINE_SETTINGFACT(displayPresetsTabFirst)
DEFINE_SETTINGFACT(aboveTerrainWarning)
DEFINE_SETTINGFACT(showMissionItemStatus)
DEFINE_SETTINGFACT(useConditionGate)
DEFINE_SETTINGFACT(takeoffItemNotRequired)
......
......@@ -196,6 +196,10 @@ ApplicationWindow {
readonly property int showDialogDefaultWidth: 40 ///< Use for default dialog width
function showComponentDialog(component, title, charWidth, buttons) {
if (mainWindowDialog.visible) {
console.warn(("showComponentDialog called while dialog is already visible"))
return
}
var dialogWidth = charWidth === showDialogFullWidth ? mainWindow.width : ScreenTools.defaultFontPixelWidth * charWidth
mainWindowDialog.width = dialogWidth
mainWindowDialog.dialogComponent = component
......
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