mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
3801b765ff
commit
8ae8c81d3d
4 changed files with 22 additions and 26 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue