refactoring

This commit is contained in:
MaxKarme 2022-11-29 17:03:05 +03:00
parent dcdcdaaa20
commit 015b2df664

View File

@ -108,36 +108,6 @@ public class FormMapWithSetAircrafts implements Form {
}
});
/*buttonAddAircraft.addActionListener(e -> {
if (listBoxMaps.getSelectedIndex() == -1)
{
return;
}
FormAircraft dialog = new FormAircraft();
dialog.run();
dialog.setSize(800, 500);
dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
dialog.setVisible(true);
if (dialog.getSelectedAircraft() == null) return;
DrawingObjectAircraft aircraft = new DrawingObjectAircraft(dialog.getSelectedAircraft());
if (_mapsCollection.getMap(listBoxMaps.getSelectedValue().toString()).addAircraft(aircraft) != -1)
{
JOptionPane.showMessageDialog(jFrame, "Объект добавлен");
img = _mapsCollection.getMap(listBoxMaps.getSelectedValue().toString()).ShowSet();
canv.repaint();
}
else
{
JOptionPane.showMessageDialog(jFrame, "Не удалось добавить объект");
}
});*/
buttonAddAircraft.addActionListener(e -> {
if (listBoxMaps.getSelectedIndex() == -1)
{