]> git.saurik.com Git - wxWidgets.git/commitdiff
Only allow opening existing files in docview framework.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 29 Mar 2010 21:24:39 +0000 (21:24 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 29 Mar 2010 21:24:39 +0000 (21:24 +0000)
Use wxFD_FILE_MUST_EXIST when asking the user for the name of the file to
open.

Closes #11866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/docview.cpp

index 8350a4117f711d7650852aea408f2814769ebcf6..635a2529bb8f31d9a5adcd3273df6ae7a0226bbe 100644 (file)
@@ -1625,7 +1625,8 @@ wxDocTemplate *wxDocManager::SelectDocumentPath(wxDocTemplate **templates,
                                         GetLastDirectory(),
                                         wxEmptyString,
                                         &FilterIndex,
-                                        descrBuf);
+                                        descrBuf,
+                                        wxFD_OPEN | wxFD_FILE_MUST_EXIST);
 
     wxDocTemplate *theTemplate = NULL;
     if (!pathTmp.empty())