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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user