summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-06-26 16:02:13 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-26 18:50:22 -0700
commit1fd4e552401713f628e111b350c77da8b504e709 (patch)
tree84070fa677d8cff53d00c0dc30d5c652362a635e /qt-ui
parent78293f50786e31f7f3d020660eeee2b183148b61 (diff)
downloadsubsurface-1fd4e552401713f628e111b350c77da8b504e709.tar.gz
Dive site rewrite: copy the changed dive site to the original
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 239286053..e61c92a3e 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -800,6 +800,8 @@ void MainTab::acceptChanges()
struct dive *added_dive = clone_dive(&displayed_dive);
record_dive(added_dive);
addedId = added_dive->id;
+ copy_dive_site(&displayed_dive_site, get_dive_site_by_uuid(displayed_dive_site.uuid));
+
// unselect everything as far as the UI is concerned and select the new
// dive - we'll have to undo/redo this later after we resort the dive_table
// but we need the dive selected for the middle part of this function - this
@@ -858,6 +860,8 @@ void MainTab::acceptChanges()
saveTaggedStrings();
saveTags();
+ copy_dive_site(&displayed_dive_site, get_dive_site_by_uuid(displayed_dive_site.uuid));
+
if (editMode != ADD && cylindersModel->changed) {
mark_divelist_changed(true);
MODIFY_SELECTED_DIVES(