diff --git a/src/app/commoncomponents/SettingParaCombobox.qml b/src/app/commoncomponents/SettingParaCombobox.qml index 64e8eaac..ecce589a 100644 --- a/src/app/commoncomponents/SettingParaCombobox.qml +++ b/src/app/commoncomponents/SettingParaCombobox.qml @@ -37,10 +37,15 @@ ComboBox { delay: Qt.styleHints.mousePressAndHoldInterval } - displayText: currentIndex !== -1 ? - currentSelectionText : (placeholderText !== "" ? - placeholderText : - JamiStrings.notAvailable) + displayText: { + // If the index is -1 and the model is empty, display the placeholder text. + // The placeholder text is either the placeholderText property or a default text. + // Otherwise, display the currentSelectionText property. + if (currentIndex < 0 && !count) { + return placeholderText !== "" ? placeholderText : JamiStrings.notAvailable + } + return currentSelectionText + } delegate: ItemDelegate { width: root.width