Cvpcb relative paths patch
This commit is contained in:
parent
0bf4b5ae9a
commit
ab468e20dc
|
@ -267,6 +267,20 @@ void DIALOG_CVPCB_CONFIG::OnAddOrInsertPath( wxCommandEvent& event )
|
||||||
if( jj >= 0 )
|
if( jj >= 0 )
|
||||||
ipos = jj;
|
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_listUserPaths->Insert( path, ipos );
|
||||||
m_LibPathChanged = true;
|
m_LibPathChanged = true;
|
||||||
wxGetApp().InsertLibraryPath( path, ipos + 1 );
|
wxGetApp().InsertLibraryPath( path, ipos + 1 );
|
||||||
|
|
Loading…
Reference in New Issue