summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Sergey Starosek <sergey.starosek@gmail.com>2014-01-19 19:30:47 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-19 13:57:40 -0800
commitb8c746d975e17b6c7be76ef816a8b061e4c12403 (patch)
treec1470d725b8f234947a5b231088a2a4ec7f0fb5c
parent9faf52dd437765bdab177d6b9d207a6784d41882 (diff)
downloadsubsurface-b8c746d975e17b6c7be76ef816a8b061e4c12403.tar.gz
Expand tags approach to divemaster field
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-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 0e6dce0f4..e8df29368 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -838,8 +838,9 @@ void MainTab::on_buddy_textChanged()
markChangedWidget(ui.buddy);
}
-void MainTab::on_divemaster_textChanged(const QString& text)
+void MainTab::on_divemaster_textChanged()
{
+ QString text = ui.divemaster->toPlainText().split(",", QString::SkipEmptyParts).join(", ");
EDIT_SELECTED_DIVES( EDIT_TEXT(mydive->divemaster, text) );
markChangedWidget(ui.divemaster);
}
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index 313149f0e..c5afd2f55 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -68,7 +68,7 @@ public slots:
void rejectChanges();
void on_location_textChanged(const QString& text);
void on_coordinates_textChanged(const QString& text);
- void on_divemaster_textChanged(const QString& text);
+ void on_divemaster_textChanged();
void on_buddy_textChanged();
void on_suit_textChanged(const QString& text);
void on_notes_textChanged();
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index b2ab316bf..276c7922f 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -136,7 +136,7 @@
</widget>
</item>
<item row="8" column="0">
- <widget class="QLineEdit" name="divemaster">
+ <widget class="TagWidget" name="divemaster">
<property name="readOnly">
<bool>false</bool>
</property>