Update wxFileDialog filter index when setting its path.

This ensures that GetFilename() and GetFilterIndex() always return consistent
results, even if the path was set programmatically, e.g. during unattended
tests using wxExpectModal<wxFileDialog>.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-08-24 15:31:55 +00:00
parent 3bcec846a0
commit 47e13f2be0
2 changed files with 37 additions and 20 deletions

View File

@@ -131,6 +131,13 @@ public:
static wxString AppendExtension(const wxString &filePath,
const wxString &extensionList);
// Set the filter index to match the given extension.
//
// This is always valid to call, even if the extension is empty or the
// filter list doesn't contain it, the function will just do nothing in
// these cases.
void SetFilterIndexFromExt(const wxString& ext);
protected:
wxString m_message;
wxString m_dir;