Skip to content

Commit aef19ca

Browse files
bug6113: local stop/stop logic for the row is consistent with the global one
1 parent 8b57cdb commit aef19ca

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

java/com.sap.sailing.gwt.ui/src/main/java/com/sap/sailing/gwt/ui/adminconsole/RaceLogTrackingEventManagementRaceImagesBarCell.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
import java.util.List;
55

66
import com.google.gwt.core.client.GWT;
7-
import com.sap.sailing.domain.common.abstractlog.TimePointSpecificationFoundInLog;
87
import com.sap.sailing.gwt.ui.adminconsole.AbstractLeaderboardConfigPanel.RaceColumnDTOAndFleetDTOWithNameBasedEquality;
98
import com.sap.sailing.gwt.ui.client.StringMessages;
10-
import com.sap.sse.common.Util.Pair;
119
import com.sap.sse.gwt.client.IconResources;
1210
import com.sap.sse.gwt.client.celltable.ImagesBarCell;
1311

@@ -60,13 +58,11 @@ protected Iterable<ImageSpec> getImageSpecs() {
6058
result.add(new ImageSpec(ACTION_SET_FINISHING_AND_FINISH_TIME, stringMessages.setFinishingAndFinishTime(), makeImagePrototype(resources.blueSmall())));
6159
result.add(new ImageSpec(ACTION_SHOW_RACELOG, stringMessages.raceLog(), makeImagePrototype(resources.flagIcon())));
6260
result.add(new ImageSpec(ACTION_SET_TRACKING_TIMES, stringMessages.setTrackingTimes(), makeImagePrototype(resources.setTrackingTimes())));
63-
Pair<TimePointSpecificationFoundInLog, TimePointSpecificationFoundInLog> startEndTrackingTime = smartphoneTrackingEventManagementPanel.getTrackingTimesFor(object);
64-
if (startEndTrackingTime == null) {
61+
boolean isForTracking = object.getA().getRaceLogTrackingInfo(object.getB()).raceLogTrackingState.isForTracking();
62+
if (!isForTracking) {
6563
result.add(new ImageSpec(ACTION_START_TRACKING, stringMessages.startTracking(), makeImagePrototype(resources.startRaceLogTracking())));
6664
} else {
67-
if (startEndTrackingTime.getB() == null || startEndTrackingTime.getB().getTimePoint() == null) {
68-
result.add(new ImageSpec(ACTION_STOP_TRACKING, stringMessages.stopTracking(), makeImagePrototype(resources.stopRaceLogTracking())));
69-
}
65+
result.add(new ImageSpec(ACTION_STOP_TRACKING, stringMessages.stopTracking(), makeImagePrototype(resources.stopRaceLogTracking())));
7066
}
7167
if (smartphoneTrackingEventManagementPanel.getSelectedLeaderboard().canBoatsOfCompetitorsChangePerRace) {
7268
result.add(new ImageSpec(ACTION_EDIT_COMPETITOR_TO_BOAT_MAPPINGS, stringMessages.actionShowCompetitorToBoatAssignments(), makeImagePrototype(resources.sailboatIcon())));

0 commit comments

Comments
 (0)