Commit e460b4a5 authored by Dick Hollenbeck's avatar Dick Hollenbeck

fix export_gencad.cpp

parent 516c386a
/* /*
* This program source code file is part of KiCad, a free EDA CAD application. * This program source code file is part of KiCad, a free EDA CAD application.
* *
* Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
* Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors. * Copyright (C) 2007 KiCad Developers, see change_log.txt for contributors.
* *
...@@ -106,7 +107,7 @@ enum LAYER_ID ...@@ -106,7 +107,7 @@ enum LAYER_ID
Edge_Cuts, Edge_Cuts,
Margin, Margin,
F_CrtYd, // CrtYd & Body are footprint only F_CrtYd, // CrtYd & Fab are footprint only
B_CrtYd, B_CrtYd,
F_Fab, F_Fab,
B_Fab, B_Fab,
......
...@@ -323,11 +323,8 @@ bool BOARD::SetLayer( LAYER_ID aIndex, const LAYER& aLayer ) ...@@ -323,11 +323,8 @@ bool BOARD::SetLayer( LAYER_ID aIndex, const LAYER& aLayer )
} }
wxString BOARD::GetLayerName( LAYER_ID aLayer ) const const wxString BOARD::GetLayerName( LAYER_ID aLayer ) const
{ {
if( !IsPcbLayer( aLayer ) )
return wxEmptyString;
// All layer names are stored in the BOARD. // All layer names are stored in the BOARD.
if( IsLayerEnabled( aLayer ) ) if( IsLayerEnabled( aLayer ) )
{ {
......
...@@ -644,7 +644,7 @@ public: ...@@ -644,7 +644,7 @@ public:
* @return wxString - the layer name, which for copper layers may * @return wxString - the layer name, which for copper layers may
* be custom, else standard. * be custom, else standard.
*/ */
wxString GetLayerName( LAYER_ID aLayer ) const; const wxString GetLayerName( LAYER_ID aLayer ) const;
/** /**
* Function SetLayerName * Function SetLayerName
......
...@@ -262,7 +262,9 @@ void DIALOG_COPPER_ZONE::initDialog() ...@@ -262,7 +262,9 @@ void DIALOG_COPPER_ZONE::initDialog()
m_LayerId.push_back( layer ); m_LayerId.push_back( layer );
msg = board->GetLayerName( layer ).Trim(); msg = board->GetLayerName( layer );
msg.Trim();
EDA_COLOR_T layerColor = board->GetLayerColor( layer ); EDA_COLOR_T layerColor = board->GetLayerColor( layer );
......
This diff is collapsed.
...@@ -129,13 +129,10 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, ...@@ -129,13 +129,10 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
aFormatter->Print( aNestLevel+1, "(%s 0x%s)\n", getTokenName( T_layerselection ), aFormatter->Print( aNestLevel+1, "(%s 0x%s)\n", getTokenName( T_layerselection ),
m_layerSelection.FmtHex().c_str() ); m_layerSelection.FmtHex().c_str() );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ),
m_useGerberExtensions ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ), aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberextensions ),
m_useGerberExtensions ? trueStr : falseStr ); m_useGerberExtensions ? trueStr : falseStr );
if( m_useGerberAttributes ) // save this option only if active, if( m_useGerberAttributes ) // save this option only if active,
// to avoid incompatibility with older Pcbnew version // to avoid incompatibility with older Pcbnew version
aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberattributes ), trueStr ); aFormatter->Print( aNestLevel+1, "(%s %s)\n", getTokenName( T_usegerberattributes ), trueStr );
...@@ -153,10 +150,12 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter, ...@@ -153,10 +150,12 @@ void PCB_PLOT_PARAMS::Format( OUTPUTFORMATTER* aFormatter,
m_useAuxOrigin ? trueStr : falseStr ); m_useAuxOrigin ? trueStr : falseStr );
aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpennumber ), aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpennumber ),
m_HPGLPenNum ); m_HPGLPenNum );
// Obsolete parameter, pen speed is no more managed, because hpgl format
// is now an export format, and for this, pen speed has no meaning // Obsolete parameter, pen speed is no more managed, because hpgl format
// aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ), // is now an export format, and for this, pen speed has no meaning
// m_HPGLPenSpeed ); // aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ),
// m_HPGLPenSpeed );
aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ), aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpenspeed ),
m_HPGLPenSpeed ); m_HPGLPenSpeed );
aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpendiameter ), aFormatter->Print( aNestLevel+1, "(%s %d)\n", getTokenName( T_hpglpendiameter ),
......
...@@ -105,7 +105,9 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init() ...@@ -105,7 +105,9 @@ void DIALOG_NON_COPPER_ZONES_EDITOR::Init()
{ {
LAYER_ID layer = *seq; LAYER_ID layer = *seq;
wxString msg = m_Parent->GetBoard()->GetLayerName( layer ).Trim(); wxString msg = m_Parent->GetBoard()->GetLayerName( layer );
msg.Trim();
m_LayerSelectionCtrl->InsertItems( 1, &msg, ii ); m_LayerSelectionCtrl->InsertItems( 1, &msg, ii );
......
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