Don't assert if the path is not absolute in wxFileDialog::SetPath().
Remove the assert added in r62101 (see #10917), it was wrong as the other ports do not assert in this case. Instead, just ensure that the path we use with the GTK+ native chooser is absolute. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62769 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -369,8 +369,11 @@ void wxFileDialog::SetMessage(const wxString& message)
|
|||||||
|
|
||||||
void wxFileDialog::SetPath(const wxString& path)
|
void wxFileDialog::SetPath(const wxString& path)
|
||||||
{
|
{
|
||||||
wxCHECK_RET(wxIsAbsolutePath(path), " wxFileDialog::SetPath requires an absolute filepath");
|
// we need an absolute path for GTK native chooser so ensure that we have
|
||||||
m_fc.SetPath( path );
|
// it
|
||||||
|
wxFileName fn(path);
|
||||||
|
fn.MakeAbsolute();
|
||||||
|
m_fc.SetPath(fn.GetFullPath());
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFileDialog::SetDirectory(const wxString& dir)
|
void wxFileDialog::SetDirectory(const wxString& dir)
|
||||||
|
Reference in New Issue
Block a user