Commit ab468e20 authored by charras's avatar charras

Cvpcb relative paths patch

parent 0bf4b5ae
......@@ -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 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment