Optimised Delete Flight Path Function and changed flight Analyser button from private to public
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -1545,7 +1545,12 @@ public class Dataset {
|
|||||||
public void deleteFlightPath(FlightPath flightPath){
|
public void deleteFlightPath(FlightPath flightPath){
|
||||||
//delete all flight points with the id
|
//delete all flight points with the id
|
||||||
while(flightPath.getFlightPoints().size() > 0){
|
while(flightPath.getFlightPoints().size() > 0){
|
||||||
deleteFlightPoint(flightPath.getFlightPoints().get(0), flightPath);
|
try {
|
||||||
|
flightPointDictionary.remove(flightPath.getFlightPoints().get(0).getID());
|
||||||
|
flightPath.getFlightPoints().remove(0);
|
||||||
|
} catch (DataException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//drop the entries
|
//drop the entries
|
||||||
Connection c = null;
|
Connection c = null;
|
||||||
@@ -1605,6 +1610,7 @@ public class Dataset {
|
|||||||
stmt.close();
|
stmt.close();
|
||||||
|
|
||||||
int index = flightPath.getFlightPoints().indexOf(flightPoint);
|
int index = flightPath.getFlightPoints().indexOf(flightPoint);
|
||||||
|
System.out.println(index);
|
||||||
|
|
||||||
if (index == 0){
|
if (index == 0){
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -261,7 +261,7 @@ public class FlightRDController extends Controller {
|
|||||||
/**
|
/**
|
||||||
* Will link to the flight analyser when implemented.
|
* Will link to the flight analyser when implemented.
|
||||||
*/
|
*/
|
||||||
private void flightAnalyser(){
|
public void flightAnalyser(){
|
||||||
JOptionPane.showMessageDialog(null, "This is not Implemented yet");
|
JOptionPane.showMessageDialog(null, "This is not Implemented yet");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user