Fix stock templates path for flatpak

Commit ad251b7b8c 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-05-10 17:57:23 +00:00
committed by Seth Hillbrand
parent bd97aaa63e
commit ea0d9076e7
+4 -4
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;
}