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
593aa2dc
Commit
593aa2dc
authored
Nov 15, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show KISYSMOD in DIALOG_FP_LIB_TABLE even if it has not been referenced by a URI.
parent
7196e7bc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
4 deletions
+23
-4
edaappl.cpp
common/edaappl.cpp
+6
-4
fp_lib_table.cpp
common/fp_lib_table.cpp
+6
-0
fp_lib_table.h
include/fp_lib_table.h
+10
-0
dialog_fp_lib_table.cpp
pcbnew/dialogs/dialog_fp_lib_table.cpp
+1
-0
No files found.
common/edaappl.cpp
View file @
593aa2dc
...
...
@@ -51,6 +51,7 @@
#include <online_help.h>
#include <gestfich.h>
#include <menus_helpers.h>
#include <fp_lib_table.h>
static
const
wxChar
*
CommonConfigPath
=
wxT
(
"kicad_common"
);
...
...
@@ -1161,18 +1162,19 @@ bool EDA_APP::LockFile( const wxString& fileName )
bool
EDA_APP
::
SetFootprintLibTablePath
()
{
wxString
path
;
wxString
kisysmod
=
FP_LIB_TABLE
::
GlobalPathEnvVariableName
();
// Set the KISYSMOD environment variable for the current process if it is not already
// defined in the user's environment. This is required to expand the global footprint
// library table paths.
if
(
wxGetEnv
(
wxT
(
"KISYSMOD"
)
,
&
path
)
&&
wxFileName
::
DirExists
(
path
)
)
if
(
wxGetEnv
(
kisysmod
,
&
path
)
&&
wxFileName
::
DirExists
(
path
)
)
return
true
;
// Set the KISYSMOD environment variable to the path defined in the user's configuration
// if it is defined and the path exists.
if
(
m_commonSettings
->
Read
(
kicadFpLibPath
,
&
path
)
&&
wxFileName
::
DirExists
(
path
)
)
{
wxSetEnv
(
wxT
(
"KISYSMOD"
)
,
path
);
wxSetEnv
(
kisysmod
,
path
);
return
true
;
}
...
...
@@ -1198,7 +1200,7 @@ bool EDA_APP::SetFootprintLibTablePath()
if
(
modFileCount
!=
0
)
{
wxSetEnv
(
wxT
(
"KISYSMOD"
)
,
bestPath
);
wxSetEnv
(
kisysmod
,
bestPath
);
return
true
;
}
}
...
...
common/fp_lib_table.cpp
View file @
593aa2dc
...
...
@@ -734,6 +734,12 @@ const wxString FP_LIB_TABLE::ProjectPathEnvVariableName()
}
const
wxString
FP_LIB_TABLE
::
GlobalPathEnvVariableName
()
{
return
wxT
(
"KISYSMOD"
);
}
wxString
FP_LIB_TABLE
::
GetProjectFileName
(
const
wxFileName
&
aPath
)
{
wxFileName
fn
=
aPath
;
...
...
include/fp_lib_table.h
View file @
593aa2dc
...
...
@@ -574,6 +574,16 @@ public:
*/
static
const
wxString
ProjectPathEnvVariableName
();
/**
* Function GlobalPathEnvVarVariableName
* returns the name of the environment variable used to hold the directory of
* locally installed "KiCad sponsored" system footprint libraries. These can
* be either legacy or pretty format. The only thing special about this
* particular environment variable is that it is set automatically by
* KiCad on program startup, <b>iff</b> it is not set already in the environment.
*/
static
const
wxString
GlobalPathEnvVariableName
();
static
wxString
GetProjectFileName
(
const
wxFileName
&
aPath
);
/**
...
...
pcbnew/dialogs/dialog_fp_lib_table.cpp
View file @
593aa2dc
...
...
@@ -696,6 +696,7 @@ private:
// not used yet. It is automatically set by KiCad to the directory holding
// the current project.
unique
.
insert
(
FP_LIB_TABLE
::
ProjectPathEnvVariableName
()
);
unique
.
insert
(
FP_LIB_TABLE
::
GlobalPathEnvVariableName
()
);
m_path_subs_grid
->
AppendRows
(
unique
.
size
()
);
...
...
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