added comments why no event is fired when we set min/max on the slider bar

This commit is contained in:
Axel Uhl committed 2012-02-28 20:58:04 +01:00
1 parent 674196c458
commit 08effa64bf
2 files changed
+2 -2

No files matched your search

@@ -174,7 +174,7 @@ public class RaceTimePanel extends TimePanel<RaceTimePanelSettings> implements R
}
// never reduce max if it was already set
if (min != null && max != null && (getMax() == null || getMax().before(max))) {
setMinMax(min, max, false);
setMinMax(min, max, /* fireEvent */ false); // no event because we guarantee time to be between min and max
}
}
@@ -271,7 +271,7 @@ public class TimePanel<T extends TimePanelSettings> extends FormPanel implements
// Handle it equally for replay and live mode for robustness reasons. This at least allows a user
// to watch on even if the time panel was off in its assumptions about race end and end of tracking.
if (time.after(getMax())) {
setMinMax(getMin(), time, false);
setMinMax(getMin(), time, /* fireEvent */ false); // no event because we guarantee that time is between min/max
}
long t = time.getTime();
sliderBar.setCurrentValue(new Double(t), false);