diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-13 20:41:48 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-13 21:01:52 -0800 |
commit | 1ea445102ed34b704345b4fd3b0ac00fa8380b06 (patch) | |
tree | ec692c631c9338bdf7bc7bd85a4470ce58bff239 /planner.c | |
parent | c8a99864512eebeb705b495c7aba4da1ff8a5816 (diff) | |
download | subsurface-1ea445102ed34b704345b4fd3b0ac00fa8380b06.tar.gz |
Correctly show the planned dive in the divelist
Previously we would simply show the first dive in the divelist - which
worked fine in the default sort by trip setting and assuming that there
are no dives from the future in the divelist.
With this commit we actually find the correct dive in the divelist and
select it instead. If you sort by depth you will see the dive move around
in the divelist, but it will stay selected and visible in the profile.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'planner.c')
-rw-r--r-- | planner.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -504,9 +504,9 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep) record_dive(dive); stopidx--; } - /* now make the dive visible as last dive of the dive list */ + /* now make the dive visible in the dive list */ report_dives(FALSE, FALSE); - select_last_dive(); + show_and_select_dive(dive); free(stoplevels); free(gaschanges); } |