Add convenient wxFileName::GetAbsolutePath() wrapper and use it
This wrapper simply combines the calls to MakeAbsolute() and GetFullPath(), but using it results in shorter and more clear code, so it seems to be worth having.
This commit is contained in:
@@ -601,8 +601,7 @@ void AppFrame::CreateMenu ()
|
||||
|
||||
void AppFrame::FileOpen (wxString fname)
|
||||
{
|
||||
wxFileName w(fname); w.MakeAbsolute(); fname = w.GetFullPath();
|
||||
m_edit->LoadFile (fname);
|
||||
m_edit->LoadFile (wxFileName(fname).GetAbsolutePath());
|
||||
m_edit->SelectNone();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user