summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp3
-rw-r--r--qt-ui/maintab.h2
-rw-r--r--qt-ui/maintab.ui2
3 files changed, 4 insertions, 3 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 9fa94c8d6..81e820a71 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -834,8 +834,9 @@ void markChangedWidget(QWidget *w){
w->setPalette(p);
}
-void MainTab::on_buddy_textChanged(const QString& text)
+void MainTab::on_buddy_textChanged()
{
+ QString text = ui.buddy->toPlainText().split(",", QString::SkipEmptyParts).join(", ");
EDIT_SELECTED_DIVES( EDIT_TEXT(mydive->buddy, text) );
markChangedWidget(ui.buddy);
}
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index ec2140b1e..313149f0e 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -69,7 +69,7 @@ public slots:
void on_location_textChanged(const QString& text);
void on_coordinates_textChanged(const QString& text);
void on_divemaster_textChanged(const QString& text);
- void on_buddy_textChanged(const QString& text);
+ void on_buddy_textChanged();
void on_suit_textChanged(const QString& text);
void on_notes_textChanged();
void on_airtemp_textChanged(const QString& text);
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index 846fb4f12..b2ab316bf 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -157,7 +157,7 @@
</widget>
</item>
<item row="8" column="1">
- <widget class="QLineEdit" name="buddy">
+ <widget class="TagWidget" name="buddy">
<property name="readOnly">
<bool>false</bool>
</property>