Commit eaca86d3 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #4984 from DonLakeFlyer/Fixes

Fixes
parents fb4d4aa1 a0d1d6fc
......@@ -791,7 +791,7 @@ QGCView {
anchors.right: rightPanel.left
anchors.bottom: parent.bottom
missionItems: missionController.visualItems
//visible: _editingLayer === _layerMission && !ScreenTools.isShortScreen
visible: _editingLayer === _layerMission && !ScreenTools.isShortScreen
}
} // QGCViewPanel
......
......@@ -35,38 +35,7 @@ Rectangle {
readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
readonly property real _buttonSpacing: ScreenTools.defaultFontPixelWidth
// All of the following values, connections and function are to support the ability to determine
// whether to show or hide the optional elements on the fly.
property bool _showOptionalElements: true
property bool _needRecalc: false
Component.onCompleted: recalcShowOptionalElements()
onMaxHeightChanged: recalcShowOptionalElements()
Connections {
target: ScreenTools
onDefaultFontPixelWidthChanged: recalcShowOptionalElements()
onDefaultFontPixelHeightChanged: recalcShowOptionalElements()
}
onHeightChanged: {
if (_needRecalc) {
_needRecalc = false
if (maxHeight && height > maxHeight) {
_showOptionalElements = false
}
}
}
function recalcShowOptionalElements() {
if (maxHeight > 0) {
_needRecalc = false
_showOptionalElements = height <= maxHeight
_needRecalc = true
}
}
property bool _showOptionalElements: !ScreenTools.isTinyScreen
QGCPalette { id: qgcPal }
ExclusiveGroup { id: dropButtonsExclusiveGroup }
......
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