]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Oops. Fix 'buffered dive' information
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 11 Sep 2011 20:43:37 +0000 (13:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 11 Sep 2011 22:49:50 +0000 (15:49 -0700)
When fixing the unit changes, I broke the dive buffering logic entirely
for switching between dives. Duh.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
main.c

diff --git a/main.c b/main.c
index 138de29ecf4f108adba69c8f4facf04d910996a4..360af8498a45a12d8dda70bb56f15257f2b1b82d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -98,12 +98,12 @@ void update_dive(struct dive *new_dive)
        if (old_dive) {
                flush_dive_info_changes(old_dive);
                flush_dive_equipment_changes(old_dive);
-               buffered_dive = new_dive;
        }
        if (new_dive) {
                show_dive_info(new_dive);
                show_dive_equipment(new_dive);
        }
+       buffered_dive = new_dive;
 }
 
 void repaint_dive(void)