Commit 5977565f authored by DonLakeFlyer's avatar DonLakeFlyer

Fix bad redraw with Simple Mission Item editors

parent 8192004c
...@@ -15,7 +15,7 @@ import QGroundControl.Palette 1.0 ...@@ -15,7 +15,7 @@ import QGroundControl.Palette 1.0
/// Mission item edit control /// Mission item edit control
Rectangle { Rectangle {
id: _root id: _root
height: editorLoader.y + editorLoader.height + (_margin * 2) height: editorLoader.y + (editorLoader.visible ? editorLoader.height : 0) + (_margin * 2)
color: _currentItem ? qgcPal.missionItemEditor : qgcPal.windowShade color: _currentItem ? qgcPal.missionItemEditor : qgcPal.windowShade
radius: _radius radius: _radius
...@@ -198,12 +198,8 @@ Rectangle { ...@@ -198,12 +198,8 @@ Rectangle {
anchors.topMargin: _margin anchors.topMargin: _margin
anchors.left: parent.left anchors.left: parent.left
anchors.top: commandPicker.bottom anchors.top: commandPicker.bottom
height: item ? item.height : 0
source: missionItem.editorQml source: missionItem.editorQml
visible: _currentItem
onLoaded: {
item.visible = Qt.binding(function() { return _currentItem; })
}
property var masterController: _masterController property var masterController: _masterController
property real availableWidth: _root.width - (_margin * 2) ///< How wide the editor should be property real availableWidth: _root.width - (_margin * 2) ///< How wide the editor should be
......
...@@ -12,29 +12,14 @@ import QGroundControl.Palette 1.0 ...@@ -12,29 +12,14 @@ import QGroundControl.Palette 1.0
// Editor for Simple mission items // Editor for Simple mission items
Rectangle { Rectangle {
id: valuesRect
width: availableWidth width: availableWidth
height: deferedload.status == Loader.Ready ? (visible ? deferedload.item.height : 0) : 0 height: valuesColumn.height + _margin
color: qgcPal.windowShadeDark color: qgcPal.windowShadeDark
visible: missionItem.isCurrentItem
radius: _radius radius: _radius
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 { Column {
id: valuesColumn id: valuesColumn
anchors.margins: _margin
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
anchors.top: parent.top anchors.top: parent.top
...@@ -153,7 +138,4 @@ Rectangle { ...@@ -153,7 +138,4 @@ Rectangle {
visible: missionItem.cameraSection.available visible: missionItem.cameraSection.available
} }
} // Column } // Column
} // Item
} // Component
} // Loader
} // Rectangle } // 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