- added save prompt when closing map editor (code based on MuwuM's contribution, thanks)

This commit is contained in:
Mark Vejvoda 2011-01-23 04:49:49 +00:00
parent 0fbb29d875
commit dc133351e7
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}