Check normalize path result instead of blindly using it.
Fix #7323 again
This commit is contained in:
parent
1572d90ee7
commit
4c1b4b4159
|
@ -750,6 +750,11 @@ void PANEL_SYM_LIB_TABLE::onConvertLegacyLibraries( wxCommandEvent& event )
|
|||
relPath = NormalizePath( newLib.GetFullPath(), &Pgm().GetLocalEnvVariables(),
|
||||
m_project );
|
||||
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( relPath.IsEmpty() || (m_cur_grid == m_global_grid && relPath.Contains( "${KIPRJMOD}" ) ) )
|
||||
relPath = newLib.GetFullPath();
|
||||
|
||||
auto model = static_cast<SYMBOL_LIB_TABLE_GRID*>( m_cur_grid->GetTable() );
|
||||
model->SetValue( row, COL_URI, relPath );
|
||||
model->SetValue( row, COL_TYPE, kicadType );
|
||||
|
|
Loading…
Reference in New Issue