summaryrefslogtreecommitdiffstats
path: root/qt-ui/diveplanner.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-18 11:55:56 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-18 11:55:56 -0800
commit8ae8c81d3d47e5ba6b7ea292c92a9527fc85994f (patch)
tree52a3b5676d1d01a6d0b823346022d6fcd77f855f /qt-ui/diveplanner.h
parent3801b765fff847adff1899c7d54484b0bb100c87 (diff)
downloadsubsurface-8ae8c81d3d47e5ba6b7ea292c92a9527fc85994f.tar.gz
Fix various issues with the dive add / edit manual dive code
- get_gas_from_events does NOT always set o2/he. It only updates them IFF a matching event is found; so we need to make sure we start out with a valid gas mix - the way we tried to restore the edited dive in case of an edit to a manually added that is cancelled was completely bogus. Way too complex when we can simply and reliably simply store the dive and then copy it back Fixes #270 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r--qt-ui/diveplanner.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index a310cf045..1d15fb766 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -61,7 +61,8 @@ public slots:
void createTemporaryPlan();
void deleteTemporaryPlan();
void loadFromDive(dive* d);
- void undoEdition();
+ void restoreBackupDive();
+
signals:
void planCreated();
void planCanceled();
@@ -73,6 +74,7 @@ private:
Mode mode;
QVector<divedatapoint> divepoints;
struct dive *tempDive;
+ struct dive backupDive;
void deleteTemporaryPlan(struct divedatapoint *dp);
QVector<sample> backupSamples; // For editing added dives.
struct dive *stagingDive;