fix issue 162

git-svn-id: https://osmand.googlecode.com/svn/trunk@655 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
Victor Shcherb 2010-11-11 22:03:22 +00:00
parent c970815ac8
commit e561312188

View file

@ -280,6 +280,7 @@ public class OsmExtractionUI implements IMapLocationListener {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
frame.setVisible(false); frame.setVisible(false);
exit();
} }
}); });
settings.addActionListener(new ActionListener(){ settings.addActionListener(new ActionListener(){
@ -502,6 +503,11 @@ public class OsmExtractionUI implements IMapLocationListener {
public class ExitListener extends WindowAdapter { public class ExitListener extends WindowAdapter {
public void windowClosing(WindowEvent event) { public void windowClosing(WindowEvent event) {
exit();
}
}
public void exit(){
// save preferences // save preferences
DataExtractionSettings settings = DataExtractionSettings.getSettings(); DataExtractionSettings settings = DataExtractionSettings.getSettings();
settings.saveDefaultLocation(mapPanel.getLatitude(), mapPanel.getLongitude()); settings.saveDefaultLocation(mapPanel.getLatitude(), mapPanel.getLongitude());
@ -509,7 +515,6 @@ public class OsmExtractionUI implements IMapLocationListener {
settings.saveWindowBounds(frame.getBounds()); settings.saveWindowBounds(frame.getBounds());
System.exit(0); System.exit(0);
} }
}