Merge remote-tracking branch 'origin/Lab_6' into Lab_6

This commit is contained in:
ZakenChannel 2024-05-07 14:05:00 +04:00
commit c76a9ca2f6

View File

@ -161,11 +161,10 @@ public class FormWarPlaneCollection extends Application implements Initializable
@FXML @FXML
private void buttonGoToFormWithDeleteObject() { private void buttonGoToFormWithDeleteObject() {
if (!removedPlanesStack.isEmpty()) { if (!removedPlanesStack.isEmpty()) {
goToFormAirFighter(removedPlanesStack.get(new Random().nextInt(0, removedPlanesStack.size()))); goToFormAirFighter(removedPlanesStack.pop());
} else { } else {
showAlert("Стек удаленных объектов пуст."); showAlert("Стек удаленных объектов пуст.");
} }
} }
@FXML @FXML