diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-28 10:39:06 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-04-28 12:47:15 -0700 |
commit | 4f20bb9fb2731fdfd9faab3b109a0cbce8c89298 (patch) | |
tree | 53d3ec10cba13faa571cf081cffad0f7902f3124 /profile.c | |
parent | 2d24779b6226f6f9757abe565307d2956b375c0d (diff) | |
download | subsurface-4f20bb9fb2731fdfd9faab3b109a0cbce8c89298.tar.gz |
When scrolling to dive, scroll to trip first
The behavior at startup is actually very annoying: we select the latest
dive, and expand the trip it is in, but since we use "scrollTo()" on
just the dive, and it's not initially visible, the startup will make the
first dive be at the top of the list view.
Which means that the actual _trip_ detail is not visible at all, since
it will have been scrolled off the list view entirely.
Fix this by first scrolling to the trip, and only then scrolling to the
actual dive (using the default "EnsureVisible" policy). Obviously, if
it's a trip with lots of dives, scrolling to the dive may end up
scrolling away from the trip header again, but at least that never
happens at startup, and at that point you have to scroll away from the
trip just to show the dive.
Do this same dance when changing the dive selection (mainly noticeable
when picking dives on the globe view).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
0 files changed, 0 insertions, 0 deletions