bug4670: Use equals for comparison in RaceMap#updateSettings() for getBouyZone(). Changed order in updateSettings() so that showManeuvers() call has the correct new settings.

This commit is contained in:
Alessandro Stoltenberg committed 2018-07-17 17:14:29 +02:00
1 parent 38df8fd6d2
commit e364f0bca3
1 file changed
+8 -7
@@ -2634,12 +2634,6 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
maneuverTypeSelectionChanged = true;
}
}
if (maneuverTypeSelectionChanged) {
if (!(timer.getPlayState() == PlayStates.Playing) && lastManeuverResult != null) {
removeAllManeuverMarkers();
showManeuvers(lastManeuverResult);
}
}
if (newSettings.isShowDouglasPeuckerPoints() != settings.isShowDouglasPeuckerPoints()) {
if (!(timer.getPlayState() == PlayStates.Playing) && lastDouglasPeuckerResult != null && newSettings.isShowDouglasPeuckerPoints()) {
removeAllMarkDouglasPeuckerpoints();
@@ -2651,7 +2645,7 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
if (newSettings.getTailLengthInMilliseconds() != settings.getTailLengthInMilliseconds()) {
requiresRedraw = true;
}
if (newSettings.getBuoyZoneRadius() != settings.getBuoyZoneRadius()) {
if (!newSettings.getBuoyZoneRadius().equals(settings.getBuoyZoneRadius())) {
requiresRedraw = true;
}
if (newSettings.isShowOnlySelectedCompetitors() != settings.isShowOnlySelectedCompetitors()) {
@@ -2697,6 +2691,13 @@ public class RaceMap extends AbstractCompositeComponent<RaceMapSettings> impleme
}
this.settings = newSettings;
if (maneuverTypeSelectionChanged) {
if (!(timer.getPlayState() == PlayStates.Playing) && lastManeuverResult != null) {
removeAllManeuverMarkers();
showManeuvers(lastManeuverResult);
}
}
if (requiresUpdateCoordinateSystem) {
updateCoordinateSystemFromSettings();
}