Expand tags approach to divemaster field

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Sergey Starosek 2014-01-19 19:30:47 +02:00 committed by Dirk Hohndel
parent 9faf52dd43
commit b8c746d975
3 changed files with 4 additions and 3 deletions

View file

@ -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);
}

View file

@ -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();

View file

@ -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>