From 1219dc693170e4a04fff992bd5aed990674779c1 Mon Sep 17 00:00:00 2001 From: Joakim Bygdell Date: Mon, 12 Sep 2016 20:30:07 +0200 Subject: QML UI: deal with multiple buddies correctly When editing adive in Subsurface-mobile we can only handle one buddy due to the limitations of the combobox. To prevent loss of data when editing a dive with more than one buddy we display "Multiple Buddies" in the buddy field. This creates a special case where no changes are written to the buddy field unless the user changes buddy for that dive. Signed-off-by: Dirk Hohndel --- core/subsurface-qt/DiveObjectHelper.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'core/subsurface-qt') diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index 37f954cb7..246e4510b 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -425,6 +425,7 @@ QStringList DiveObjectHelper::buddyList() const QRegExp sep("(,\\s)"); QStringList tempList = temp.split(sep); buddies << tempList; + buddies << "Multiple Buddies"; } } buddies.removeDuplicates(); -- cgit v1.2.3-70-g09d2