Fix search paths for default project template
This commit is contained in:
parent
cd7a2cd807
commit
a70106a3bd
|
@ -26,6 +26,7 @@
|
||||||
#include <wx/stdpaths.h>
|
#include <wx/stdpaths.h>
|
||||||
|
|
||||||
#include <common.h>
|
#include <common.h>
|
||||||
|
#include <kiplatform/environment.h>
|
||||||
#include <search_stack.h>
|
#include <search_stack.h>
|
||||||
#include <pgm_base.h>
|
#include <pgm_base.h>
|
||||||
#include <config.h> // to define DEFAULT_INSTALL_PATH
|
#include <config.h> // to define DEFAULT_INSTALL_PATH
|
||||||
|
@ -70,7 +71,7 @@ void SystemDirsAppend( SEARCH_STACK* aSearchStack )
|
||||||
// According to wxWidgets documentation:
|
// According to wxWidgets documentation:
|
||||||
// Unix: ~/.appname
|
// Unix: ~/.appname
|
||||||
// Windows: C:\Documents and Settings\username\Application Data\appname
|
// Windows: C:\Documents and Settings\username\Application Data\appname
|
||||||
maybe.AddPaths( wxStandardPaths::Get().GetUserDataDir() );
|
maybe.AddPaths( KIPLATFORM::ENV::GetDocumentsPath() );
|
||||||
|
|
||||||
{
|
{
|
||||||
// Should be full path to this program executable.
|
// Should be full path to this program executable.
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include <filehistory.h>
|
#include <filehistory.h>
|
||||||
#include <hotkeys_basic.h>
|
#include <hotkeys_basic.h>
|
||||||
#include <kiway.h>
|
#include <kiway.h>
|
||||||
|
#include <paths.h>
|
||||||
#include <settings/settings_manager.h>
|
#include <settings/settings_manager.h>
|
||||||
#include <systemdirsappend.h>
|
#include <systemdirsappend.h>
|
||||||
#include <wildcards_and_files_ext.h>
|
#include <wildcards_and_files_ext.h>
|
||||||
|
@ -126,6 +127,8 @@ bool PGM_KICAD::OnPgmInit()
|
||||||
m_bm.m_search.AddPaths( fn.GetPath() );
|
m_bm.m_search.AddPaths( fn.GetPath() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_bm.m_search.AddPaths( PATHS::GetUserTemplatesPath() );
|
||||||
|
|
||||||
// The KICAD6_TEMPLATE_DIR takes precedence over the search stack template path.
|
// The KICAD6_TEMPLATE_DIR takes precedence over the search stack template path.
|
||||||
ENV_VAR_MAP_CITER it = GetLocalEnvVariables().find( "KICAD6_TEMPLATE_DIR" );
|
ENV_VAR_MAP_CITER it = GetLocalEnvVariables().find( "KICAD6_TEMPLATE_DIR" );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue