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:
Vadim Zeitlin
2009-12-03 16:26:15 +00:00
parent a243da29c8
commit 8f79ece333

View File

@@ -369,8 +369,11 @@ void wxFileDialog::SetMessage(const wxString& message)
void wxFileDialog::SetPath(const wxString& path)
{
wxCHECK_RET(wxIsAbsolutePath(path), " wxFileDialog::SetPath requires an absolute filepath");
m_fc.SetPath( path );
// we need an absolute path for GTK native chooser so ensure that we have
// it
wxFileName fn(path);
fn.MakeAbsolute();
m_fc.SetPath(fn.GetFullPath());
}
void wxFileDialog::SetDirectory(const wxString& dir)