From 0ac31ef6324e670eb5cd1c0435c9e673c8794807 Mon Sep 17 00:00:00 2001 From: Axel Uhl Date: Thu, 24 Apr 2014 09:42:51 +0200 Subject: [PATCH] addressing bug 896 by temporarily unregistering LeaderboardPanel as TimeListener from Timer while adjusting live delay in case null would be used as request time point --- .../sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java index 106945a46f7..05c489c9a40 100755 --- a/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java +++ b/java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/leaderboard/LeaderboardPanel.java @@ -1647,7 +1647,16 @@ public class LeaderboardPanel extends SimplePanel implements TimeListener, PlayS } private void setDelayInMilliseconds(long delayInMilliseconds) { + // If the timer is currently in a mode that causes null to be used as the leaderboard request time stamp, + // don't let a live play delay change cause another load request by unregistering this panel as timer + // listener before and re-registering it after adjusting the live play delay. + if (useNullAsTimePoint()) { + timer.removeTimeListener(this); + } timer.setLivePlayDelayInMillis(delayInMilliseconds); + if (useNullAsTimePoint()) { + timer.addTimeListener(this); + } } private boolean isAutoExpandPreSelectedRace() {