From ab24c1df87f3eec4494420b547e687b20897590f Mon Sep 17 00:00:00 2001
From: Dirk Hohndel <dirk@hohndel.org>
Date: Wed, 22 Apr 2015 09:35:58 -0700
Subject: [PATCH] When editing the location, make sure it gets applied to the
 dives

Oops, that was embarrassing. Just setting it on displayed_dive doesn't
gain us anything if it isn't transferred to the selected dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
---
 qt-ui/maintab.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 2deca04de..a75b80722 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -780,6 +780,8 @@ void MainTab::acceptChanges()
 			time_t offset = cd->when - displayed_dive.when;
 			MODIFY_SELECTED_DIVES(mydive->when -= offset;);
 		}
+		if (displayed_dive.dive_site_uuid != cd->dive_site_uuid)
+			MODIFY_SELECTED_DIVES(EDIT_VALUE(dive_site_uuid));
 
 		saveTags();