From 450a5bdd2d7e30132a97482d797cd6795d813567 Mon Sep 17 00:00:00 2001
From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Fri, 10 Jan 2003 17:57:05 +0000
Subject: [PATCH] corrected type for text document (non standard save handler)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 samples/docview/doc.cpp | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/samples/docview/doc.cpp b/samples/docview/doc.cpp
index 9cbea87d86..7ce1d828e6 100644
--- a/samples/docview/doc.cpp
+++ b/samples/docview/doc.cpp
@@ -24,6 +24,9 @@
 #include "wx/wx.h"
 #endif
 #include "wx/txtstrm.h"
+#ifdef __WXMAC__
+#include "wx/filename.h"
+#endif
 
 #if !wxUSE_DOC_VIEW_ARCHITECTURE
 #error You must set wxUSE_DOC_VIEW_ARCHITECTURE to 1 in setup.h!
@@ -31,7 +34,6 @@
 
 #include "doc.h"
 #include "view.h"
-
 IMPLEMENT_DYNAMIC_CLASS(DrawingDocument, wxDocument)
 
 DrawingDocument::DrawingDocument(void)
@@ -342,6 +344,10 @@ bool TextEditDocument::OnSaveDocument(const wxString& filename)
     if (!view->textsw->SaveFile(filename))
         return FALSE;
     Modify(FALSE);
+#ifdef __WXMAC__
+    wxFileName fn(filename) ;
+    fn.MacSetDefaultTypeAndCreator() ;
+#endif
     return TRUE;
 }
 
-- 
2.47.2