mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-20 19:20:04 +00:00
Adjusted TracTracEventManagementPanelPO.startTrackingForRaces to throw
an exception if not all given races were selected
This commit is contained in:
1 parent
cdfa2140dc
commit
700e6f8728
1 file changed
+5
-1
+5
-1
@@ -244,9 +244,13 @@ public class TracTracEventManagementPanelPO extends PageArea {
|
||||
}
|
||||
|
||||
public void startTrackingForRaces(List<TrackableRaceDescriptor> races) {
|
||||
List<TrackableRaceDescriptor> racesToProcess = new ArrayList<>(races);
|
||||
CellTablePO<DataEntryPO> table = getTrackableRacesTable();
|
||||
table.selectEntries(e -> races.contains(new TrackableRaceDescriptor(e.getColumnContent("Event"),
|
||||
table.selectEntries(e -> racesToProcess.remove(new TrackableRaceDescriptor(e.getColumnContent("Event"),
|
||||
e.getColumnContent("Race"), e.getColumnContent("Boat Class"))));
|
||||
if(!racesToProcess.isEmpty()) {
|
||||
throw new IllegalStateException("Not all given races where selected");
|
||||
}
|
||||
startTrackingAndWaitForAjaxRequests();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user