Fix setting the title for the wxDirDialog on OSX
OSX 10.11+ doesn't actually display the title, so update documentation to reference SetMessage instead. For pre-10.11 override the SetTitle method to set the title of the NSOpenPanel instead of the window. Also change so the directory is not updated unless it is provided. Closes #15143.
This commit is contained in:
committed by
Vadim Zeitlin
parent
61afcae0be
commit
7230acd110
@@ -47,6 +47,10 @@ public:
|
||||
|
||||
virtual int ShowModal() wxOVERRIDE;
|
||||
|
||||
// MacOS 10.11 has removed the titlebar from the dialog, so this is provided
|
||||
// only for compatibility with older versions
|
||||
virtual void SetTitle(const wxString& title) wxOVERRIDE;
|
||||
|
||||
virtual wxString GetPath() const wxOVERRIDE;
|
||||
virtual void GetPaths(wxArrayString& paths) const wxOVERRIDE;
|
||||
|
||||
@@ -69,6 +73,7 @@ private:
|
||||
void Init();
|
||||
|
||||
wxArrayString m_paths;
|
||||
wxString m_title;
|
||||
|
||||
wxDECLARE_DYNAMIC_CLASS(wxDirDialog);
|
||||
};
|
||||
|
Reference in New Issue
Block a user