+
+ // delete all non-modified documents
+ wxList& rListDocs = theApp->getDocManager()->GetDocuments();
+ for (wxNode* pNode = rListDocs.GetFirst(); pNode != NULL; pNode = pNode->GetNext()) {
+ wxDocument* pDoc = static_cast<wxDocument*>(pNode->GetData());
+ if (! pDoc->IsModified()) {
+ GetDocumentManager()->RemoveDocument(pDoc);
+ delete pDoc;
+ }
+ }
+ ::wxYield();