summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-19 14:16:33 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-19 14:20:18 -0800
commit6acff53735c41cc6636525aa364c62808219d3fb (patch)
tree6639d39a470725444475420ed7587061801fa2b4 /qt-ui/maintab.cpp
parent65e980d483576e952d15b14c369ac9beb7a07605 (diff)
downloadsubsurface-6acff53735c41cc6636525aa364c62808219d3fb.tar.gz
Fix trip summary line in dive list
Two errors fixed. - With no location set, the summary line would start with a ','. - When auto creating a trip for a manually added dive or when editing the dates of dives in a trip, the timestamp for the trip was not updated after editing the dive. Fixes #293 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 16c0a1f14..763c61ec5 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -13,6 +13,7 @@
#include "globe.h"
#include "completionmodels.h"
#include "diveplanner.h"
+#include "divelist.h"
#include "qthelper.h"
#include <QLabel>
@@ -499,6 +500,10 @@ void MainTab::acceptChanges()
}
}
+ if (current_dive->divetrip) {
+ current_dive->divetrip->when = current_dive->when;
+ find_new_trip_start_time(current_dive->divetrip);
+ }
if (editMode == ADD || editMode == MANUALLY_ADDED_DIVE) {
// clean up the dive data (get duration, depth information from samples)
fixup_dive(current_dive);