summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 7335711e9..00aae5f29 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -980,6 +980,10 @@ void MainTab::on_buddy_textChanged()
{
if (editMode == IGNORE || acceptingEdit == true)
return;
+
+ if (same_string(displayed_dive.buddy, ui.buddy->toPlainText().toUtf8().data()))
+ return;
+
QStringList text_list = ui.buddy->toPlainText().split(",", QString::SkipEmptyParts);
for (int i = 0; i < text_list.size(); i++)
text_list[i] = text_list[i].trimmed();
@@ -993,6 +997,10 @@ void MainTab::on_divemaster_textChanged()
{
if (editMode == IGNORE || acceptingEdit == true)
return;
+
+ if (same_string(displayed_dive.divemaster, ui.divemaster->toPlainText().toUtf8().data()))
+ return;
+
QStringList text_list = ui.divemaster->toPlainText().split(",", QString::SkipEmptyParts);
for (int i = 0; i < text_list.size(); i++)
text_list[i] = text_list[i].trimmed();
@@ -1102,8 +1110,15 @@ void MainTab::saveTags()
void MainTab::on_tagWidget_textChanged()
{
+ char buf[1024];
+
if (editMode == IGNORE || acceptingEdit == true)
return;
+
+ taglist_get_tagstring(displayed_dive.tag_list, buf, 1024);
+ if (same_string(buf, ui.tagWidget->toPlainText().toUtf8().data()))
+ return;
+
markChangedWidget(ui.tagWidget);
}