diff --git a/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java b/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java index aea0373e9f..982a664475 100644 --- a/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java +++ b/DataExtractionOSM/src/net/osmand/swing/OsmExtractionUI.java @@ -280,6 +280,7 @@ public class OsmExtractionUI implements IMapLocationListener { @Override public void actionPerformed(ActionEvent e) { frame.setVisible(false); + exit(); } }); settings.addActionListener(new ActionListener(){ @@ -502,15 +503,19 @@ public class OsmExtractionUI implements IMapLocationListener { public class ExitListener extends WindowAdapter { public void windowClosing(WindowEvent event) { - // save preferences - DataExtractionSettings settings = DataExtractionSettings.getSettings(); - settings.saveDefaultLocation(mapPanel.getLatitude(), mapPanel.getLongitude()); - settings.saveDefaultZoom(mapPanel.getZoom()); - settings.saveWindowBounds(frame.getBounds()); - System.exit(0); + exit(); } } + public void exit(){ + // save preferences + DataExtractionSettings settings = DataExtractionSettings.getSettings(); + settings.saveDefaultLocation(mapPanel.getLatitude(), mapPanel.getLongitude()); + settings.saveDefaultZoom(mapPanel.getZoom()); + settings.saveWindowBounds(frame.getBounds()); + System.exit(0); + } +