mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-08 20:12:23 +00:00
bug6214: moving tail removal into a method to stay consistent
This commit is contained in:
1 parent
85e17dccd8
commit
a1b20fe18e
1 file changed
+9
-6
+9
-6
@@ -2026,12 +2026,17 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
|
||||
boatCanvas.removeFromMap();
|
||||
boatOverlaysByCompetitorIdsAsStrings.remove(unusedBoatCanvasCompetitorDTO);
|
||||
}
|
||||
for (String unusedTailCompetitorDTO : competitorIdsAsStringOfUnusedTails) {
|
||||
fixesAndTails.removeTail(unusedTailCompetitorDTO);
|
||||
for (String unusedTailCompetitorIdAsString : competitorIdsAsStringOfUnusedTails) {
|
||||
removeTail(unusedTailCompetitorIdAsString);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void removeTail(String competitorIdAsString) {
|
||||
fixesAndTails.removeTail(competitorIdAsString);
|
||||
lastAppliedTailDisplayModes.remove(competitorIdAsString);
|
||||
}
|
||||
|
||||
/**
|
||||
* This algorithm is limited to distances such that dlon < pi/2, i.e., those that extend around less than one
|
||||
@@ -3209,8 +3214,7 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
|
||||
if (!next.getKey().equals(competitor.getIdAsString())) {
|
||||
CanvasOverlayV3 boatOverlay = next.getValue();
|
||||
boatOverlay.removeFromMap();
|
||||
fixesAndTails.removeTail(next.getKey());
|
||||
lastAppliedTailDisplayModes.remove(next.getKey());
|
||||
removeTail(next.getKey());
|
||||
i.remove(); // only this way a ConcurrentModificationException while looping can be avoided
|
||||
}
|
||||
}
|
||||
@@ -3246,8 +3250,7 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
|
||||
if (removedBoatOverlay != null) {
|
||||
removedBoatOverlay.removeFromMap();
|
||||
}
|
||||
fixesAndTails.removeTail(competitor.getIdAsString());
|
||||
lastAppliedTailDisplayModes.remove(competitor.getIdAsString());
|
||||
removeTail(competitor.getIdAsString());
|
||||
showCompetitorInfoOnMap(timer.getTime(), -1, competitorSelection.getSelectedFilteredCompetitors());
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user