No real changes but avoid making the document deletion code even more opaque
by duplicating the code already existing as a function elsewhere.
Closes #11364.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65065
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxDocManager::OnFileClose(wxCommandEvent& WXUNUSED(event))
{
wxDocument *doc = GetCurrentDocument();
- if (!doc)
- return;
- if (doc->Close())
- {
- doc->DeleteAllViews();
- if (m_docs.Member(doc))
- delete doc;
- }
+ if (doc)
+ CloseDocument(doc);
}
void wxDocManager::OnFileCloseAll(wxCommandEvent& WXUNUSED(event))