Fix stock templates path for flatpak

Commit ad251b7b broke the template path
lookup for flatpak via `PATHS::GetStockTemplatesPath()`. Fix this by
using `::GetStockEDALibraryPath()` in all EDA Library related path
lookup functions.

`GetStockEDALibraryPath()` effectively does the same as
`GetStockDataPath()`, but it takes care to check the
`KICAD_LIBRARY_DATA` build config, which is being used by flatpak to
point to the flatpak EDA Library extensions in
`/app/extensions/Library/`.

Closes #11174
This commit is contained in:
Johannes Maibaum 2022-03-24 22:02:05 +01:00
parent 3f0f846435
commit edc7261099
1 changed files with 4 additions and 4 deletions

View File

@ -203,7 +203,7 @@ wxString PATHS::GetStockSymbolsPath()
{
wxString path;
path = GetStockDataPath() + wxT( "/symbols" );
path = GetStockEDALibraryPath() + wxT( "/symbols" );
return path;
}
@ -213,7 +213,7 @@ wxString PATHS::GetStockFootprintsPath()
{
wxString path;
path = GetStockDataPath() + wxT( "/footprints" );
path = GetStockEDALibraryPath() + wxT( "/footprints" );
return path;
}
@ -223,7 +223,7 @@ wxString PATHS::GetStock3dmodelsPath()
{
wxString path;
path = GetStockDataPath() + wxT( "/3dmodels" );
path = GetStockEDALibraryPath() + wxT( "/3dmodels" );
return path;
}
@ -243,7 +243,7 @@ wxString PATHS::GetStockTemplatesPath()
{
wxString path;
path = GetStockDataPath() + wxT( "/template" );
path = GetStockEDALibraryPath() + wxT( "/template" );
return path;
}