Symbol and footprint library table editor fix.
Prevent the symbol and footprint library table editors from substituting the current project path (${KIPRJMOD}) when adding libraries to the global library table. This will almost assuredly fail when opening a different project. We still allow users to manually use ${KIPRJMOD} in global table paths under the assumption that if they are typing this in then they most likely understand environment variable substitution. Fixes lp:1830694 https://bugs.launchpad.net/kicad/+bug/1830694
This commit is contained in:
parent
7ce38ee6f8
commit
288982b15d
|
@ -414,7 +414,9 @@ void PANEL_SYM_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
// try to use path normalized to an environmental variable or project path
|
||||
wxString path = NormalizePath( filePath, &envVars, m_projectBasePath );
|
||||
|
||||
if( path.IsEmpty() )
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( path.IsEmpty() || (m_pageNdx == 0 && path.Contains( "${KIPRJMOD}" )) )
|
||||
path = fn.GetFullPath();
|
||||
|
||||
m_cur_grid->SetCellValue( last_row, COL_URI, path );
|
||||
|
|
|
@ -667,7 +667,9 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
// try to use path normalized to an environmental variable or project path
|
||||
wxString path = NormalizePath( filePath, &envVars, m_projectBasePath );
|
||||
|
||||
if( path.IsEmpty() )
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( path.IsEmpty() || (m_pageNdx == 0 && path.Contains( "${KIPRJMOD}" )) )
|
||||
path = fn.GetFullPath();
|
||||
|
||||
m_cur_grid->SetCellValue( last_row, COL_URI, path );
|
||||
|
|
Loading…
Reference in New Issue