Optimised Delete Flight Path Function and changed flight Analyser button from private to public

main
YaFedImYaEatIm 9 years ago
parent 7396ea1f04
commit 7e94a272f0

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");
} }

Loading…
Cancel
Save