Some fixes from master branch:
- fix environment variable changes after running Pcbnew in some cases. - kicad manager: correct bitmap icon for gerber job files - incorrect position of some checkboxes (not readable) when compiled with wxWidgets 3.1.4
This commit is contained in:
parent
894291faba
commit
63baa69342
|
@ -94,7 +94,7 @@ FIELDS_GRID_TABLE<T>::FIELDS_GRID_TABLE( DIALOG_SHIM* aDialog, SCH_BASE_FRAME* a
|
|||
m_boolAttr = new wxGridCellAttr;
|
||||
m_boolAttr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||
m_boolAttr->SetEditor( new wxGridCellBoolEditor() );
|
||||
m_boolAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
|
||||
m_boolAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
|
||||
wxArrayString vAlignNames;
|
||||
vAlignNames.Add( _( "Top" ) );
|
||||
|
|
|
@ -56,6 +56,7 @@ enum TreeFileType {
|
|||
TREE_LEGACY_PCB, // board file (.brd) legacy format
|
||||
TREE_SEXP_PCB, // board file (.kicad_brd) new s expression format
|
||||
TREE_GERBER, // Gerber file (.pho, .g*)
|
||||
TREE_GERBER_JOB_FILE, // Gerber file (.gbrjob)
|
||||
TREE_HTML, // HTML file (.htm, *.html)
|
||||
TREE_PDF, // PDF file (.pdf)
|
||||
TREE_TXT, // ascii text file (.txt)
|
||||
|
|
|
@ -278,6 +278,10 @@ wxString TREE_PROJECT_FRAME::GetFileExt( TreeFileType type )
|
|||
ext = GerberFileExtensionWildCard;
|
||||
break;
|
||||
|
||||
case TREE_GERBER_JOB_FILE:
|
||||
ext = GerberJobFileExtension;
|
||||
break;
|
||||
|
||||
case TREE_HTML:
|
||||
ext = HtmlFileExtension;
|
||||
break;
|
||||
|
@ -535,6 +539,9 @@ bool TREE_PROJECT_FRAME::AddItemToTreeProject( const wxString& aName,
|
|||
if( ext == wxT( "" ) )
|
||||
continue;
|
||||
|
||||
if( i == TREE_GERBER ) // For gerber files, the official ext is gbr
|
||||
ext = "gbr";
|
||||
|
||||
reg.Compile( wxString::FromAscii( "^.*\\" ) + ext +
|
||||
wxString::FromAscii( "$" ), wxRE_ICASE );
|
||||
|
||||
|
|
|
@ -223,6 +223,7 @@ void TREEPROJECT_ITEM::Activate( TREE_PROJECT_FRAME* aTreePrjFrame )
|
|||
break;
|
||||
|
||||
case TREE_GERBER:
|
||||
case TREE_GERBER_JOB_FILE:
|
||||
case TREE_DRILL:
|
||||
case TREE_DRILL_NC:
|
||||
case TREE_DRILL_XNC:
|
||||
|
|
|
@ -62,6 +62,7 @@ TREEPROJECTFILES::TREEPROJECTFILES( TREE_PROJECT_FRAME* parent ) :
|
|||
m_ImageList->Add( KiBitmap( pcbnew_xpm ) ); // TREE_LEGACY_PCB
|
||||
m_ImageList->Add( KiBitmap( pcbnew_xpm ) ); // TREE_SFMT_PCB
|
||||
m_ImageList->Add( KiBitmap( icon_gerbview_small_xpm ) ); // TREE_GERBER
|
||||
m_ImageList->Add( KiBitmap( gerber_job_file_xpm ) ); // TREE_GERBER_JOB_FILE (.gbrjob)
|
||||
m_ImageList->Add( KiBitmap( html_xpm ) ); // TREE_HTML
|
||||
m_ImageList->Add( KiBitmap( datasheet_xpm ) ); // TREE_PDF
|
||||
m_ImageList->Add( KiBitmap( editor_xpm ) ); // TREE_TXT
|
||||
|
|
|
@ -1283,10 +1283,17 @@ void PCB_EDIT_FRAME::PythonSyncEnvironmentVariables()
|
|||
#if defined( KICAD_SCRIPTING )
|
||||
const ENV_VAR_MAP& varMap = Pgm().GetLocalEnvVariables();
|
||||
|
||||
// Set the environment variables for python scripts
|
||||
// note: the string will be encoded UTF8 for python env
|
||||
for( ENV_VAR_MAP_CITER it = varMap.begin(); it != varMap.end(); ++it )
|
||||
{
|
||||
pcbnewUpdatePythonEnvVar( it->first, it->second.GetValue() );
|
||||
}
|
||||
|
||||
// Because the env vars can de modifed by the python scripts (rewritten in UTF8 encoding),
|
||||
// regenerate them (in unicode wide chars) for our normal environment
|
||||
for( auto& var : varMap )
|
||||
wxSetEnv( var.first, var.second.GetValue() );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1297,6 +1304,10 @@ void PCB_EDIT_FRAME::PythonSyncProjectName()
|
|||
wxString evValue;
|
||||
wxGetEnv( PROJECT_VAR_NAME, &evValue );
|
||||
pcbnewUpdatePythonEnvVar( wxString( PROJECT_VAR_NAME ).ToStdString(), evValue );
|
||||
|
||||
// Because PROJECT_VAR_NAME can be modifed by the python scripts (rewritten in UTF8),
|
||||
// regenerate it (in unicode wide chars) for our normal environment
|
||||
wxSetEnv( PROJECT_VAR_NAME, evValue );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ TEXT_MOD_GRID_TABLE::TEXT_MOD_GRID_TABLE( EDA_UNITS_T aUserUnits, PCB_BASE_FRAME
|
|||
m_boolColAttr = new wxGridCellAttr;
|
||||
m_boolColAttr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||
m_boolColAttr->SetEditor( new wxGridCellBoolEditor() );
|
||||
m_boolColAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
|
||||
m_boolColAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
||||
|
||||
if( g_menuOrientations.IsEmpty() )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue