summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-13 20:41:48 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-01-13 21:01:52 -0800
commit1ea445102ed34b704345b4fd3b0ac00fa8380b06 (patch)
treeec692c631c9338bdf7bc7bd85a4470ce58bff239 /planner.c
parentc8a99864512eebeb705b495c7aba4da1ff8a5816 (diff)
downloadsubsurface-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/planner.c b/planner.c
index c1b0fb4a3..dc5e53406 100644
--- a/planner.c
+++ b/planner.c
@@ -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);
}