mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-24 21:13:50 +00:00
fixed endless recursion during wind loading and notification that was introduced by commit 95e4be71a4
This commit is contained in:
1 parent
3c0472974a
commit
5e97ea3b0e
1 file changed
+6
-5
+6
-5
@@ -617,13 +617,14 @@ DynamicTrackedRace, GPSTrackListener<Competitor, GPSFixMoving> {
|
||||
}
|
||||
|
||||
/**
|
||||
* In addition to calling the super class implementation, notifies all race listeners registered with this tracked
|
||||
* race using their {@link RaceChangeListener#windDataReceived(Wind, WindSource)} method. In particular this
|
||||
* replicates all wind fixes that may have been loaded from the wind store for the new track.
|
||||
* In addition to calling the superclass implementation, for a stored wind track whose fixes were loaded by this
|
||||
* call, all listeners are notified about these existing wind fixes using their
|
||||
* {@link RaceChangeListener#windDataReceived(Wind, WindSource)} callback method. In particular this replicates all
|
||||
* wind fixes that may have been loaded from the wind store for the new track.
|
||||
*/
|
||||
@Override
|
||||
protected WindTrack createWindTrack(WindSource windSource, long delayForWindEstimationCacheInvalidation) {
|
||||
WindTrack result = super.createWindTrack(windSource, delayForWindEstimationCacheInvalidation);
|
||||
public WindTrack getOrCreateWindTrack(WindSource windSource) {
|
||||
WindTrack result = super.getOrCreateWindTrack(windSource);
|
||||
if (windSource.getType().canBeStored()) {
|
||||
// replicate all wind fixes that may have been loaded by the wind store
|
||||
result.lockForRead();
|
||||
|
||||
Reference in new issue
Block a user