Cvpcb relative paths patch

This commit is contained in:
charras 2010-02-05 15:59:33 +00:00
parent 0bf4b5ae9a
commit ab468e20dc
1 changed files with 14 additions and 0 deletions

View File

@ -267,6 +267,20 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event )
if( jj >= 0 )
ipos = jj;
}
// Ask the user if this is a relative path
int diag = wxMessageBox(
_( "Use a relative path?" ),
_( "Path type" ),
wxYES_NO | wxICON_QUESTION, this );
if( diag == wxYES )
{ // Make it relative
wxFileName fn = path;
fn.MakeRelativeTo( wxT(".") );
path = fn.GetPathWithSep() + fn.GetFullName();
}
m_listUserPaths->Insert( path, ipos );
m_LibPathChanged = true;
wxGetApp().InsertLibraryPath( path, ipos + 1 );