mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
planner: update UI after having saved the dive
The UI was updated before storing the dive. This had a nasty effect: the current dive was shown in the profile and if that was a manually added dive, the DivePlannerPointsModel was overwritten. Thus the planned dive couldn't be saved anymore. There is a comment why the UI switch was done beforehand. But in my tests, this didn't seem to be valid anymore. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1fbdc387c8
commit
357e115121
1 changed files with 2 additions and 2 deletions
|
@ -1338,8 +1338,6 @@ void DivePlannerPointsModel::createPlan(bool replanCopy)
|
|||
}
|
||||
|
||||
setPlanMode(NOTHING);
|
||||
planCreated(); // This signal will exit the profile from planner state. This must be *before* adding the dive,
|
||||
// so that the Undo-commands update the display accordingly (see condition in updateDiveInfo().
|
||||
|
||||
// Now, add or modify the dive.
|
||||
if (!current_dive || d->id != current_dive->id) {
|
||||
|
@ -1367,4 +1365,6 @@ void DivePlannerPointsModel::createPlan(bool replanCopy)
|
|||
// Remove and clean the diveplan, so we don't delete
|
||||
// the dive by mistake.
|
||||
free_dps(&diveplan);
|
||||
|
||||
planCreated(); // This signal will exit the UI from planner state.
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue