diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp index a91c12d1..17a2b4aa 100755 --- a/source/glest_map_editor/main.cpp +++ b/source/glest_map_editor/main.cpp @@ -362,6 +362,11 @@ void MainWindow::init(string fname) { } void MainWindow::onClose(wxCloseEvent &event) { + if( wxMessageDialog(NULL, ToUnicode("Do you want to save the current map?"), + ToUnicode("Question"), wxYES_NO | wxYES_DEFAULT).ShowModal() == wxID_YES) { + wxCommandEvent ev; + MainWindow::onMenuFileSave(ev); + } delete this; }