Pcbnew, python console: make it not dockable (workaround to avoid the fact accelerator keys which are used in the main menu are not sent to the console, in docked mode).

Minor cosmetic enhancement.
This commit is contained in:
jean-pierre charras
2014-06-19 08:26:53 +02:00
18 changed files with 325 additions and 47 deletions
+107 -1
View File
@@ -109,6 +109,112 @@ wxString GetGerberExtension( LAYER_NUM layer )
}
wxString GetGerberFileFunction( const BOARD *aBoard, LAYER_NUM aLayer )
{
wxString attrib = wxEmptyString;
switch( aLayer )
{
case LAYER_N_BACK:
attrib = wxString::Format( wxT( "Copper,L%d" ), aBoard->GetCopperLayerCount() );
break;
case LAYER_N_2:
case LAYER_N_3:
case LAYER_N_4:
case LAYER_N_5:
case LAYER_N_6:
case LAYER_N_7:
case LAYER_N_8:
case LAYER_N_9:
case LAYER_N_10:
case LAYER_N_11:
case LAYER_N_12:
case LAYER_N_13:
case LAYER_N_14:
case LAYER_N_15:
// LAYER_N_2 is the first inner layer counting from the bottom; this
// must be converted to a 1-based number starting from the top
attrib = wxString::Format( wxT( "Copper,L%d" ),
aBoard->GetCopperLayerCount() - ( aLayer - LAYER_N_2 + 1 ) );
break;
case LAYER_N_FRONT:
attrib = wxString( wxT( "Copper,L1" ) );
break;
case ADHESIVE_N_FRONT:
attrib = wxString( wxT( "Glue,Top" ) );
break;
case ADHESIVE_N_BACK:
attrib = wxString( wxT( "Glue,Bot" ) );
break;
case SILKSCREEN_N_FRONT:
attrib = wxString( wxT( "Legend,Top" ) );
break;
case SILKSCREEN_N_BACK:
attrib = wxString( wxT( "Legend,Bot" ) );
break;
case SOLDERMASK_N_FRONT:
attrib = wxString( wxT( "Soldermask,Top" ) );
break;
case SOLDERMASK_N_BACK:
attrib = wxString( wxT( "Soldermask,Bot" ) );
break;
case SOLDERPASTE_N_FRONT:
attrib = wxString( wxT( "Paste,Top" ) );
break;
case SOLDERPASTE_N_BACK:
attrib = wxString( wxT( "Paste,Bot" ) );
break;
case EDGE_N:
attrib = wxString( wxT( "Profile" ) );
break;
case DRAW_N:
attrib = wxString( wxT( "Drawing" ) );
break;
case COMMENT_N:
attrib = wxString( wxT( "Other,Comment" ) );
break;
case ECO1_N:
case ECO2_N:
attrib = wxString::Format( wxT( "Other,ECO%d" ), aLayer - ECO1_N + 1 );
break;
}
// Add the signal type of the layer, if relevant
if( FIRST_COPPER_LAYER <= aLayer && aLayer <= LAST_COPPER_LAYER ) {
LAYER_T type = aBoard->GetLayerType( aLayer );
switch( type )
{
case LT_SIGNAL:
attrib += wxString( wxT( ",Signal" ) );
break;
case LT_POWER:
attrib += wxString( wxT( ",Plane" ) );
break;
case LT_MIXED:
attrib += wxString( wxT( ",Mixed" ) );
break;
default:
; // do nothing (but avoid a warning for unhandled LAYER_T values from GCC)
}
}
return attrib;
}
void BuildPlotFileName( wxFileName* aFilename,
const wxString& aOutputDir,
const wxString& aSuffix,
@@ -241,7 +347,7 @@ bool PLOT_CONTROLLER::OpenPlotfile( const wxString &aSuffix,
wxFileName fn( boardFilename );
BuildPlotFileName( &fn, outputDirName, aSuffix, GetDefaultPlotExtension( aFormat ) );
m_plotter = StartPlotBoard( m_board, &m_plotOpts, fn.GetFullPath(), aSheetDesc );
m_plotter = StartPlotBoard( m_board, &m_plotOpts, UNDEFINED_LAYER, fn.GetFullPath(), aSheetDesc );
}
return( m_plotter != NULL );