Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
ccd9500b
Commit
ccd9500b
authored
Mar 10, 2013
by
Miguel Angel Ajo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Project templates now can find the system templates from KICAD environment variable
parent
5fc382df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
prjconfig.cpp
kicad/prjconfig.cpp
+12
-1
project_template.h
kicad/project_template.h
+1
-0
No files found.
kicad/prjconfig.cpp
View file @
ccd9500b
...
...
@@ -69,9 +69,20 @@ void KICAD_MANAGER_FRAME::CreateNewProject( const wxString aPrjFullFileName, boo
{
DIALOG_TEMPLATE_SELECTOR
*
ps
=
new
DIALOG_TEMPLATE_SELECTOR
(
this
);
wxFileName
templatePath
;
// Add a new tab for system templates
wxFileName
templatePath
=
wxPathOnly
(
wxStandardPaths
::
Get
().
GetExecutablePath
())
+
if
(
::
wxGetEnv
(
wxT
(
"KICAD"
),
NULL
)
)
{
wxString
kicadEnv
;
wxGetEnv
(
wxT
(
"KICAD"
),
&
kicadEnv
);
templatePath
=
kicadEnv
+
SEP
()
+
wxT
(
"template"
)
+
SEP
();
}
else
{
wxFileName
templatePath
=
wxPathOnly
(
wxStandardPaths
::
Get
().
GetExecutablePath
())
+
SEP
()
+
wxT
(
".."
)
+
SEP
()
+
wxT
(
"share"
)
+
SEP
()
+
wxT
(
"template"
)
+
SEP
();
}
ps
->
AddPage
(
_
(
"System Templates"
),
templatePath
);
...
...
kicad/project_template.h
View file @
ccd9500b
...
...
@@ -97,6 +97,7 @@
wxStandardPaths::GetExecutableDir()/../share/template/
wxStandardPaths::GetUserDataDir()/templates/
wxGetEnv(wxT("KICAD_TEMPLATES"))
wxGetEnv(wxT("KICAD"))/template/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment