]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
wxDataObejct and related changes (won't compile right now)
[wxWidgets.git] / src / common / docview.cpp
index 2c827b697ad35a3728f48a984c3cbf603c6c6144..95b489ee7d3c1744b8e2944555d023ff3d051836 100644 (file)
@@ -706,6 +706,7 @@ wxDocManager::wxDocManager(long flags, bool initialize)
     m_currentView = (wxView *) NULL;
     m_maxDocsOpen = 10000;
     m_fileHistory = (wxFileHistory *) NULL;
     m_currentView = (wxView *) NULL;
     m_maxDocsOpen = 10000;
     m_fileHistory = (wxFileHistory *) NULL;
+    m_lastDirectory = wxT("") ;
     if (initialize)
         Initialize();
 }
     if (initialize)
         Initialize();
 }
@@ -1224,7 +1225,7 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
 
     int FilterIndex = 0;
     wxString pathTmp = wxFileSelectorEx(_("Select a file"),
 
     int FilterIndex = 0;
     wxString pathTmp = wxFileSelectorEx(_("Select a file"),
-                                        wxT(""),
+                                        m_lastDirectory,
                                         wxT(""),
                                         &FilterIndex,
                                         descrBuf,
                                         wxT(""),
                                         &FilterIndex,
                                         descrBuf,
@@ -1233,6 +1234,8 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
 
     if (!pathTmp.IsEmpty())
     {
 
     if (!pathTmp.IsEmpty())
     {
+        m_lastDirectory = wxPathOnly(pathTmp);
+
         path = pathTmp;
         wxString theExt = FindExtension(path);
         if (!theExt)
         path = pathTmp;
         wxString theExt = FindExtension(path);
         if (!theExt)