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
7196e7bc
Commit
7196e7bc
authored
Nov 15, 2013
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show KIPRJMOD in DIALOG_FP_LIB_TABLE even if it has not been referenced by a URI.
parent
c1429f28
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
8 deletions
+15
-8
fp_lib_table.cpp
common/fp_lib_table.cpp
+4
-7
fp_lib_table.h
include/fp_lib_table.h
+6
-1
dialog_fp_lib_table.cpp
pcbnew/dialogs/dialog_fp_lib_table.cpp
+5
-0
No files found.
common/fp_lib_table.cpp
View file @
7196e7bc
...
@@ -49,9 +49,6 @@ using namespace FP_LIB_TABLE_T;
...
@@ -49,9 +49,6 @@ using namespace FP_LIB_TABLE_T;
*/
*/
static
const
wxString
traceFpLibTable
(
wxT
(
"KicadFpLibTable"
)
);
static
const
wxString
traceFpLibTable
(
wxT
(
"KicadFpLibTable"
)
);
/// The evinronment variable name for the current project path. This is used interanally
/// at run time and is not exposed outside of the current process.
static
wxString
projectPathEnvVariableName
(
wxT
(
"KIPRJMOD"
)
);
/// The footprint library table name used when no project file is passed to Pcbnew or CvPcb.
/// The footprint library table name used when no project file is passed to Pcbnew or CvPcb.
/// This is used temporarily to store the project specific library table until the project
/// This is used temporarily to store the project specific library table until the project
...
@@ -726,14 +723,14 @@ void FP_LIB_TABLE::SetProjectPathEnvVariable( const wxFileName& aPath )
...
@@ -726,14 +723,14 @@ void FP_LIB_TABLE::SetProjectPathEnvVariable( const wxFileName& aPath )
path
=
aPath
.
GetPath
();
path
=
aPath
.
GetPath
();
wxLogTrace
(
traceFpLibTable
,
wxT
(
"Setting env %s to <%s>."
),
wxLogTrace
(
traceFpLibTable
,
wxT
(
"Setting env %s to <%s>."
),
GetChars
(
projectPathEnvVariableName
),
GetChars
(
path
)
);
GetChars
(
ProjectPathEnvVariableName
()
),
GetChars
(
path
)
);
wxSetEnv
(
projectPathEnvVariableName
,
path
);
wxSetEnv
(
ProjectPathEnvVariableName
()
,
path
);
}
}
const
wxString
&
FP_LIB_TABLE
::
GetProjectPathEnvVariableName
()
const
const
wxString
FP_LIB_TABLE
::
ProjectPathEnvVariableName
()
{
{
return
projectPathEnvVariableName
;
return
wxT
(
"KIPRJMOD"
)
;
}
}
...
...
include/fp_lib_table.h
View file @
7196e7bc
...
@@ -567,7 +567,12 @@ public:
...
@@ -567,7 +567,12 @@ public:
static
void
SetProjectPathEnvVariable
(
const
wxFileName
&
aPath
);
static
void
SetProjectPathEnvVariable
(
const
wxFileName
&
aPath
);
const
wxString
&
GetProjectPathEnvVariableName
()
const
;
/**
* Function ProjectPathEnvVarVariableName
* returns the name of the environment variable used to hold the directory of
* the current project on program startup.
*/
static
const
wxString
ProjectPathEnvVariableName
();
static
wxString
GetProjectFileName
(
const
wxFileName
&
aPath
);
static
wxString
GetProjectFileName
(
const
wxFileName
&
aPath
);
...
...
pcbnew/dialogs/dialog_fp_lib_table.cpp
View file @
7196e7bc
...
@@ -692,6 +692,11 @@ private:
...
@@ -692,6 +692,11 @@ private:
}
}
}
}
// Make sure this special environment variable shows up even if it was
// not used yet. It is automatically set by KiCad to the directory holding
// the current project.
unique
.
insert
(
FP_LIB_TABLE
::
ProjectPathEnvVariableName
()
);
m_path_subs_grid
->
AppendRows
(
unique
.
size
()
);
m_path_subs_grid
->
AppendRows
(
unique
.
size
()
);
row
=
0
;
row
=
0
;
...
...
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