mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 23:13:25 +00:00
Do not go to edit mode if nothing changed
Fixes #804 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e1db5f21b1
commit
414b9807e6
1 changed files with 15 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue