| 1001 | } |
| 1002 | |
| 1003 | CDocument *CEditorApp::OpenDocumentFile(LPCTSTR lpszFileName) { |
| 1004 | // TODO: Add your specialized code here and/or call the base class |
| 1005 | if (main_doc) |
| 1006 | if (main_doc->GetPathName() == lpszFileName) |
| 1007 | if (Mine_changed) { |
| 1008 | // we are trying to revert to on-disk level, so we should prompt the user if he wants |
| 1009 | // this, and then if so to close the current document |
| 1010 | if (AfxMessageBox("This will discard all changes made to the level.\nDo you want to continue?", MB_YESNO) == |
| 1011 | IDYES) { |
| 1012 | mprintf(0, "Restoring %s...\n", lpszFileName); |
| 1013 | main_doc->OnOpenDocument(lpszFileName); |
| 1014 | } |
| 1015 | } |
| 1016 | |
| 1017 | return CWinApp::OpenDocumentFile(lpszFileName); |
| 1018 | } |
| 1019 | |
| 1020 | // pause and resume |
| 1021 |
nothing calls this directly
no test coverage detected