QML UI: prevent modification of Multible Buddies text

"Multiple Buddies" is magic in that it means "do not change the buddies
set for this dive". Allowing the user to edit that magic phrase defeats
the purpose.

This deals with part of issue #168 - but of course that magic phrase
shouldn't be fixed as English text.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-01-22 17:01:20 -08:00
parent d62e46134d
commit bfaeb22cc5

View file

@ -177,7 +177,7 @@ Item {
} }
ComboBox { ComboBox {
id: buddyBox id: buddyBox
editable: true editable: currentText != "Multiple Buddies"
model: diveDetailsListView.currentItem.modelData.dive.buddyList model: diveDetailsListView.currentItem.modelData.dive.buddyList
inputMethodHints: Qt.ImhNoPredictiveText inputMethodHints: Qt.ImhNoPredictiveText
Layout.fillWidth: true Layout.fillWidth: true