- added save prompt when closing map editor (code based on MuwuM's contribution, thanks)
This commit is contained in:
parent
0fbb29d875
commit
dc133351e7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue