Added catching for no Paths in Dataset

main
YaFedImYaEatIm 9 years ago
parent 4118d2762c
commit ee239d9d6b

@ -120,6 +120,7 @@ public class FlightRDController extends Controller {
public void load() {
theDataSet = getParent().getCurrentDataset();
if (theDataSet != null) {
try {
try {
currentPathId = theDataSet.getFlightPaths().get(0).getID(); //Sets the default to the 1st Path
} catch (DataException e) {
@ -139,6 +140,9 @@ public class FlightRDController extends Controller {
flightPaths = theDataSet.getFlightPaths();
ArrayList<FlightPoint> flightPoints = flightPaths.get(0).getFlight();
flightTableView.setItems(FXCollections.observableArrayList(flightPoints));
}catch(IndexOutOfBoundsException e){
System.out.println("There is no Paths to show");
}
}
}

Loading…
Cancel
Save