Commit 7196e7bc authored by Dick Hollenbeck's avatar Dick Hollenbeck

Show KIPRJMOD in DIALOG_FP_LIB_TABLE even if it has not been referenced by a URI.

parent c1429f28
...@@ -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" );
} }
......
...@@ -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 );
......
...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment