Commit 88e4692d authored by Don Gagne's avatar Don Gagne

Fix visible usage

Change in visibility was causing combo box contents to reset. Visible
goes to false even when you move away from Plan view, not just when the
combo is unused.
parent 33ee9833
...@@ -43,6 +43,8 @@ Column { ...@@ -43,6 +43,8 @@ Column {
width: editorColumn.width width: editorColumn.width
height: textField.height height: textField.height
property bool showCombo: modelData.enumStrings.length > 0
QGCLabel { QGCLabel {
id: textFieldLabel id: textFieldLabel
anchors.baseline: textField.baseline anchors.baseline: textField.baseline
...@@ -55,7 +57,7 @@ Column { ...@@ -55,7 +57,7 @@ Column {
width: _editFieldWidth width: _editFieldWidth
showUnits: true showUnits: true
fact: modelData fact: modelData
visible: !comboField.visible visible: !parent.showCombo
} }
FactComboBox { FactComboBox {
...@@ -63,8 +65,8 @@ Column { ...@@ -63,8 +65,8 @@ Column {
anchors.right: parent.right anchors.right: parent.right
width: _editFieldWidth width: _editFieldWidth
indexModel: false indexModel: false
fact: visible ? modelData : _nullFact fact: showCombo ? modelData : _nullFact
visible: modelData.enumStrings.length visible: parent.showCombo
property var _nullFact: Fact { } property var _nullFact: Fact { }
} }
......
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