This commit is contained in:
BlasphemyGod 2022-11-08 16:32:08 +04:00
parent 5c582f70b3
commit ccab9cd620

View File

@ -155,12 +155,17 @@ public class FormMapWithSetArtilleries extends JFrame {
});
buttonShowDeleted.addActionListener(e -> {
FormArtillery dialog = new FormArtillery(deletedObjects.empty() ? null : ((DrawingObjectArtillery)deletedObjects.pop()).getArtillery());
dialog.setSize(800, 500);
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
if (!deletedObjects.empty()) {
DrawingObjectArtillery deleted = (DrawingObjectArtillery) deletedObjects.pop();
FormArtillery dialog = new FormArtillery(deleted.getArtillery());
dialog.setSize(800, 500);
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
dialog.setVisible(true);
} else {
JOptionPane.showMessageDialog(this, "Стек удалённых объектов пуст", "Провал", JOptionPane.INFORMATION_MESSAGE);
}
});
buttonLeft.addActionListener(e -> {