From 3e460f4a129f05a91e9200a64993f96f0454fe14 Mon Sep 17 00:00:00 2001 From: gered Date: Tue, 1 Dec 2015 16:30:12 -0500 Subject: [PATCH] oops, forgot about how this is used when "Exit" is chosen --- src/main/java/org/fenix/llanfair/Actions.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/fenix/llanfair/Actions.java b/src/main/java/org/fenix/llanfair/Actions.java index 8bd835b..0fe2481 100644 --- a/src/main/java/org/fenix/llanfair/Actions.java +++ b/src/main/java/org/fenix/llanfair/Actions.java @@ -256,7 +256,7 @@ final class Actions { boolean betterRun = run.isPersonalBest(); boolean betterSgt = run.hasSegmentsBest(); - boolean confirmed = false; + boolean confirmed = true; if ( betterRun || betterSgt ) { String message = betterRun @@ -267,7 +267,9 @@ final class Actions { Language.WARNING.get(), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE ); - if ( option == JOptionPane.YES_OPTION ) { + if ( option == JOptionPane.CANCEL_OPTION ) + confirmed = false; + else if ( option == JOptionPane.YES_OPTION ) { run.saveLiveTimes( !betterRun ); run.reset(); save();