Added catching for no Paths in Dataset
This commit is contained in:
@@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user