MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OpenDocumentFile

Method OpenDocumentFile

editor/editor.cpp:1003–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003CDocument *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

Callers

nothing calls this directly

Calls 1

OnOpenDocumentMethod · 0.80

Tested by

no test coverage detected