diff --git a/src/FactSystem/FactControls/FactTextFieldGrid.qml b/src/FactSystem/FactControls/FactTextFieldGrid.qml index b8d953c16e8..83cecefd794 100644 --- a/src/FactSystem/FactControls/FactTextFieldGrid.qml +++ b/src/FactSystem/FactControls/FactTextFieldGrid.qml @@ -5,8 +5,9 @@ import QGroundControl.FactSystem import QGroundControl.Controls GridLayout { - property var factList ///< List of Facts to show - property var factLabels ///< Labels for facts, if not set, use Fact.name + property var factList ///< List of Facts to show + property var factLabels ///< Labels for facts, if not set, use Fact.name or Fact.shortDescription + property bool useNameForLabels: true ///< true: Use Fact.name for labels, false: Use Fact.shortDescription rows: factList.length flow: GridLayout.TopToBottom @@ -14,7 +15,17 @@ GridLayout { Repeater { model: parent.factList - QGCLabel { text: factLabels ? factLabels[index] : modelData.name } + QGCLabel { + text: { + if (factLabels) { + return factLabels[index] + } else if (useNameForLabels) { + return modelData.name + } else { + return modelData.shortDescription + } + } + } } Repeater {