* @return false if the user canceled.
*/
public boolean checkCurrentFileSaved() {
boolean result = true;
Map map = getMap();
if (map != null && !map.getHistory().isSaved()) {
int answer = JOptionPane.showConfirmDialog(this,
"Map '" + map.getName() + "' has been modified. Do you want to save it?",
"Save the modifications",
JOptionPane.YES_NO_CANCEL_OPTION,
JOptionPane.WARNING_MESSAGE);
if (answer == JOptionPane.YES_OPTION) {
save();