Commit ce04867e authored by dickelbeck's avatar dickelbeck

BOARD::GetLayerName()

parent 7898af97
......@@ -38,7 +38,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
case TYPEMODULE:
text << _( "Footprint" ) << wxT( " " ) << ( (MODULE*) item )->GetReference();
text << wxT( " (" ) << ReturnPcbLayerName( item->m_Layer ).Trim() << wxT( ")" );
text << wxT( " (" ) << aPcb->GetLayerName( item->m_Layer ).Trim() << wxT( ")" );
break;
case TYPEPAD:
......@@ -48,15 +48,15 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
if ( (pad->m_Masque_Layer & ALL_CU_LAYERS) == ALL_CU_LAYERS )
text << _("all copper layers");
else if( (pad->m_Masque_Layer & CUIVRE_LAYER) == CUIVRE_LAYER )
text << _("copper layer");
text << aPcb->GetLayerName( COPPER_LAYER_N ).Trim();
else if( (pad->m_Masque_Layer & CMP_LAYER) == CMP_LAYER )
text << _("cmp layer");
text << aPcb->GetLayerName( LAYER_CMP_N );
else text << _("???");
text << _( ") of " ) << ( (MODULE*) GetParent() )->GetReference();
break;
case TYPEDRAWSEGMENT:
text << _( "Pcb Graphic" ) << _( " on " ) << ReturnPcbLayerName( item->GetLayer() ).Trim(); // @todo: extend text
text << _( "Pcb Graphic" ) << _( " on " ) << aPcb->GetLayerName( item->GetLayer() ).Trim(); // @todo: extend text
break;
case TYPETEXTE:
......@@ -65,7 +65,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
text << ( (TEXTE_PCB*) item )->m_Text;
else
text += ( (TEXTE_PCB*) item )->m_Text.Left( 10 ) + wxT( ".." );
text << _( " on " ) << ReturnPcbLayerName( item->GetLayer() ).Trim();
text << _( " on " ) << aPcb->GetLayerName( item->GetLayer() ).Trim();
break;
case TYPETEXTEMODULE:
......@@ -128,7 +128,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
}
text << cp;
text << wxT( " (" ) << ReturnPcbLayerName( ((EDGE_MODULE*) item )->m_Layer ).Trim() << wxT( ")" );
text << wxT( " (" ) << aPcb->GetLayerName( ((EDGE_MODULE*) item )->m_Layer ).Trim() << wxT( ")" );
text << _( " of " )
<< ( (MODULE*) GetParent() )->GetReference();
break;
......@@ -145,7 +145,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
{
text << wxT( " [" ) << net->m_Netname << wxT( "]" );
}
text << _( " on " ) << ReturnPcbLayerName( item->GetLayer() ).Trim()
text << _( " on " ) << aPcb->GetLayerName( item->GetLayer() ).Trim()
<< wxT(" ") << _("Net:") << ((TRACK*)item)->GetNet()
<< wxT(" ") << _("Length:") << valeur_param( (int) ((TRACK*)item)->GetLength(), txt );
}
......@@ -154,9 +154,10 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
case TYPEZONE_CONTAINER:
text = _( "Zone Outline" );
{
ZONE_CONTAINER* area = (ZONE_CONTAINER*) this;
int ncont = area->m_Poly->GetContour(area->m_CornerSelection);
if ( ncont ) text << wxT(" ") << _("(Cutout)");
ZONE_CONTAINER* area = (ZONE_CONTAINER*) this;
int ncont = area->m_Poly->GetContour(area->m_CornerSelection);
if( ncont )
text << wxT(" ") << _("(Cutout)");
}
text << wxT( " " );
{
......@@ -164,7 +165,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
TimeStampText.Printf( wxT( "(%8.8X)" ), item->m_TimeStamp );
text << TimeStampText;
}
if ( ((ZONE_CONTAINER*) item)->GetNet() >= 0 )
if( ((ZONE_CONTAINER*) item)->GetNet() >= 0 )
{
net = aPcb->FindNet( ( (ZONE_CONTAINER*) item )->GetNet() );
if( net )
......@@ -172,12 +173,12 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
text << wxT( " [" ) << net->m_Netname << wxT( "]" );
}
}
else // A netcode < 0 is an error flag (Netname not found or area not initialised)
else // A netcode < 0 is an error flag (Netname not found or area not initialised)
{
text << wxT( " [" ) << ( (ZONE_CONTAINER*) item )->m_Netname << wxT( "]" );
text << wxT(" <") << _("Not Found") << wxT(">");
}
text << _( " on " ) << ReturnPcbLayerName( item->GetLayer() ).Trim();
text << _( " on " ) << aPcb->GetLayerName( item->GetLayer() ).Trim();
break;
case TYPEZONE:
......@@ -193,7 +194,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
{
text << wxT( " [" ) << net->m_Netname << wxT( "]" );
}
text << _( " on " ) << ReturnPcbLayerName( item->GetLayer() ).Trim();
text << _( " on " ) << aPcb->GetLayerName( item->GetLayer() ).Trim();
break;
case TYPEVIA:
......@@ -221,8 +222,8 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
int topLayer;
int botLayer;
via->ReturnLayerPair( &topLayer, &botLayer );
text << _( " on " ) << ReturnPcbLayerName( topLayer).Trim() << wxT(" <-> ")
<< ReturnPcbLayerName( botLayer ).Trim();
text << _( " on " ) << aPcb->GetLayerName( topLayer).Trim() << wxT(" <-> ")
<< aPcb->GetLayerName( botLayer ).Trim();
}
}
break;
......@@ -238,7 +239,7 @@ wxString BOARD_ITEM::MenuText( const BOARD* aPcb ) const
case TYPEMIRE:
valeur_param( ((MIREPCB*)item)->m_Size, msg );
text << _( "Target" ) << _( " on " ) << ReturnPcbLayerName( item->GetLayer() ).Trim()
text << _( "Target" ) << _( " on " ) << aPcb->GetLayerName( item->GetLayer() ).Trim()
<< wxT( " " ) << _( "size" ) << wxT( " " ) << msg
;
break;
......
......@@ -28,7 +28,7 @@
/* class EDGE_MODULE ( contour de module ) */
/******************************************/
EDGE_MODULE::EDGE_MODULE( MODULE* parent ) :
EDGE_MODULE::EDGE_MODULE( MODULE* parent ) :
BOARD_ITEM( parent, TYPEEDGEMODULE )
{
m_Width = 0;
......@@ -164,10 +164,10 @@ void EDGE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
zoom = screen->GetZoom();
type_trace = m_Shape;
ux0 = m_Start.x - offset.x;
ux0 = m_Start.x - offset.x;
uy0 = m_Start.y - offset.y;
dx = m_End.x - offset.x;
dy = m_End.y - offset.y;
......@@ -269,7 +269,7 @@ void EDGE_MODULE::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
}
// see class_edge_mod.h
// see class_edge_mod.h
void EDGE_MODULE::Display_Infos( WinEDA_DrawFrame* frame )
{
wxString bufcar;
......@@ -277,7 +277,11 @@ void EDGE_MODULE::Display_Infos( WinEDA_DrawFrame* frame )
MODULE* module = (MODULE*) m_Parent;
if( !module )
return;
BOARD* board = (BOARD*) module->m_Parent;
if( !board )
return;
frame->MsgPanel->EraseMsgBox();
Affiche_1_Parametre( frame, 1, _( "Seg" ), wxEmptyString, DARKCYAN );
......@@ -288,10 +292,9 @@ void EDGE_MODULE::Display_Infos( WinEDA_DrawFrame* frame )
Affiche_1_Parametre( frame, 24, _( "TimeStamp" ), bufcar, BROWN );
Affiche_1_Parametre( frame, 34, _( "Mod Layer" ), ReturnPcbLayerName( module->GetLayer() ), RED );
Affiche_1_Parametre( frame, 34, _( "Mod Layer" ), board->GetLayerName( module->GetLayer() ), RED );
Affiche_1_Parametre( frame, 44, _( "Seg Layer" ),
ReturnPcbLayerName( module->GetLayer() ), RED );
Affiche_1_Parametre( frame, 44, _( "Seg Layer" ), board->GetLayerName( module->GetLayer() ), RED );
valeur_param( m_Width, bufcar );
Affiche_1_Parametre( frame, 54, _( "Width" ), bufcar, BLUE );
......@@ -334,7 +337,7 @@ bool EDGE_MODULE::Save( FILE* aFile ) const
m_End0.x, m_End0.y,
m_PolyCount,
m_Width, m_Layer );
int* pInt;
pInt = m_PolyList;
for( int i=0; i<m_PolyCount; ++i, pInt+=2 )
......@@ -343,16 +346,16 @@ bool EDGE_MODULE::Save( FILE* aFile ) const
default:
// future: throw an exception here
#if defined(DEBUG)
#if defined(DEBUG)
printf( "EDGE_MODULE::Save(): unexpected m_Shape: %d\n", m_Shape );
#endif
#endif
break;
}
return (ret > 5);
}
/****************************************************************/
......@@ -368,7 +371,7 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File,
* - Segment (line)
* - Arc
* - Polygon
*
*
*/
{
int ii, * ptr;
......@@ -459,12 +462,12 @@ int EDGE_MODULE::ReadDescr( char* Line, FILE* File,
if( m_Width > MAX_WIDTH )
m_Width = MAX_WIDTH;
// Check for a reasonnable layer:
// m_Layer must be >= FIRST_NON_COPPER_LAYER, but because microwave footprints
// can use the copper layers m_Layer < FIRST_NON_COPPER_LAYER is allowed.
// @todo: changes use of EDGE_MODULE these footprints and allows only m_Layer >= FIRST_NON_COPPER_LAYER
if ( (m_Layer < 0) || (m_Layer > LAST_NON_COPPER_LAYER) )
m_Layer = SILKSCREEN_N_CMP;
// Check for a reasonnable layer:
// m_Layer must be >= FIRST_NON_COPPER_LAYER, but because microwave footprints
// can use the copper layers m_Layer < FIRST_NON_COPPER_LAYER is allowed.
// @todo: changes use of EDGE_MODULE these footprints and allows only m_Layer >= FIRST_NON_COPPER_LAYER
if ( (m_Layer < 0) || (m_Layer > LAST_NON_COPPER_LAYER) )
m_Layer = SILKSCREEN_N_CMP;
return error;
}
......@@ -479,23 +482,23 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
{
int uxf, uyf;
int rayon, dist;
int dx, dy, spot_cX, spot_cY;
int dx, dy, spot_cX, spot_cY;
int ux0, uy0;
ux0 = m_Start.x;
ux0 = m_Start.x;
uy0 = m_Start.y;
uxf = m_End.x;
uxf = m_End.x;
uyf = m_End.y;
switch( m_Shape )
{
case S_SEGMENT:
/* recalcul des coordonnees avec ux0,uy0 = origine des coord. */
spot_cX = ref_pos.x - ux0;
spot_cX = ref_pos.x - ux0;
spot_cY = ref_pos.y - uy0;
dx = uxf - ux0;
dx = uxf - ux0;
dy = uyf - uy0;
if( DistanceTest( m_Width/2, dx, dy, spot_cX, spot_cY ) )
return true;
......@@ -522,7 +525,7 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
if( endAngle > 3600 )
{
stAngle -= 3600;
stAngle -= 3600;
endAngle -= 3600;
}
......@@ -532,7 +535,7 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
break;
}
return false; // an unknown m_Shape also returns false
return false; // an unknown m_Shape also returns false
}
......@@ -540,14 +543,14 @@ bool EDGE_MODULE::HitTest( const wxPoint& ref_pos )
/**
* Function Show
* is used to output the object tree, currently for debugging only.
* @param nestLevel An aid to prettier tree indenting, and is the level
* @param nestLevel An aid to prettier tree indenting, and is the level
* of nesting of this object within the overall tree.
* @param os The ostream& to output to.
*/
void EDGE_MODULE::Show( int nestLevel, std::ostream& os )
{
const char* cp;
switch( m_Shape )
{
case S_SEGMENT: cp = "line"; break;
......@@ -561,14 +564,14 @@ void EDGE_MODULE::Show( int nestLevel, std::ostream& os )
case S_POLYGON: cp = "polygon"; break;
default: cp = "??EDGE??"; break;
}
// for now, make it look like XML:
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
" type=\"" << cp << "\">";
os << " <start" << m_Start0 << "/>";
os << " <end" << m_End0 << "/>";
os << " </" << GetClass().Lower().mb_str() << ">\n";
}
......
This diff is collapsed.
......@@ -241,8 +241,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
WinEDA_BasePcbFrame* frame = NULL;
wxPoint shape_pos;
PCB_SCREEN* screen = panel ?
(PCB_SCREEN*) panel->m_Parent->m_CurrentScreen :
PCB_SCREEN* screen = panel ?
(PCB_SCREEN*) panel->m_Parent->m_CurrentScreen :
(PCB_SCREEN*) ActiveScreen;
if ( panel ) // Use current frame setting
......@@ -263,7 +263,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
if( m_Masque_Layer & CMP_LAYER )
color = g_PadCMPColor;
if( m_Masque_Layer & CUIVRE_LAYER )
color |= g_PadCUColor;
......@@ -330,40 +330,40 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
}
// if PAD_SMD pad and high contrast mode
// if PAD_SMD pad and high contrast mode
if( m_Attribut==PAD_SMD && DisplayOpt.ContrastModeDisplay )
{
// when routing tracks
// when routing tracks
if( frame && frame->m_ID_current_state == ID_TRACK_BUTT )
{
int routeTop = screen->m_Route_Layer_TOP;
int routeBot = screen->m_Route_Layer_BOTTOM;
// if routing between copper and component layers,
// or the current layer is one of said 2 external copper layers,
// then highlight only the current layer.
if( ((1<<routeTop) | (1<<routeBot)) == (CUIVRE_LAYER | CMP_LAYER)
|| ((1<<screen->m_Active_Layer) & (CUIVRE_LAYER | CMP_LAYER)) )
// if routing between copper and component layers,
// or the current layer is one of said 2 external copper layers,
// then highlight only the current layer.
if( ((1<<routeTop) | (1<<routeBot)) == (CUIVRE_LAYER | CMP_LAYER)
|| ((1<<screen->m_Active_Layer) & (CUIVRE_LAYER | CMP_LAYER)) )
{
if( !IsOnLayer( screen->m_Active_Layer ) )
{
color &= ~MASKCOLOR;
color |= DARKDARKGRAY;
}
}
}
// else routing between an internal signal layer and some other layer.
// grey out all PAD_SMD pads not on current or the single selected
// grey out all PAD_SMD pads not on current or the single selected
// external layer.
else if( !IsOnLayer( screen->m_Active_Layer )
&& !IsOnLayer( routeTop )
&& !IsOnLayer( routeBot ) )
else if( !IsOnLayer( screen->m_Active_Layer )
&& !IsOnLayer( routeTop )
&& !IsOnLayer( routeBot ) )
{
color &= ~MASKCOLOR;
color |= DARKDARKGRAY;
}
}
// when not edting tracks, show PAD_SMD components not on active layer as greyed out
else
{
......@@ -371,7 +371,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
{
color &= ~MASKCOLOR;
color |= DARKDARKGRAY;
}
}
}
}
......@@ -382,7 +382,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
else
color |= HIGHT_LIGHT_FLAG;
}
if( color & HIGHT_LIGHT_FLAG )
color = ColorRefs[color & MASKCOLOR].m_LightColor;
......@@ -401,7 +401,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
dy = dy0 = m_Size.y >> 1; /* demi dim dx et dy */
angle = m_Orient;
bool DisplayIsol = DisplayOpt.DisplayPadIsol;
if( ( m_Masque_Layer & ALL_CU_LAYERS ) == 0 )
DisplayIsol = FALSE;
......@@ -430,13 +430,13 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
/* calcul de l'entraxe de l'ellipse */
if( dx > dy ) /* ellipse horizontale */
{
delta_cx = dx - dy;
delta_cx = dx - dy;
delta_cy = 0;
rotdx = m_Size.y;
}
else /* ellipse verticale */
{
delta_cx = 0;
delta_cx = 0;
delta_cy = dy - dx;
rotdx = m_Size.x;
}
......@@ -459,7 +459,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
if( DisplayIsol )
{
rotdx = rotdx + g_DesignSettings.m_TrackClearence + g_DesignSettings.m_TrackClearence;
GRCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy,
ux0 - delta_cx, uy0 - delta_cy,
rotdx, color );
......@@ -496,9 +496,9 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
if( DisplayIsol )
{
dx += g_DesignSettings.m_TrackClearence;
dx += g_DesignSettings.m_TrackClearence;
dy += g_DesignSettings.m_TrackClearence;
coord[0].x = -dx - ddy;
coord[0].y = dy + ddx;
......@@ -536,7 +536,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
if( fillpad && hole )
{
color = g_IsPrinting ? WHITE : BLACK; // ou DARKGRAY;
if( draw_mode != GR_XOR )
GRSetDrawMode( DC, GR_COPY );
else
......@@ -552,7 +552,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
case PAD_OVAL:
dx = m_Drill.x >> 1;
dy = m_Drill.y >> 1; /* demi dim dx et dy */
/* calcul de l'entraxe de l'ellipse */
if( m_Drill.x > m_Drill.y ) /* ellipse horizontale */
{
......@@ -583,7 +583,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int
{
dx0 = MIN( dx0, dy0 );
int nc_color = BLUE;
if( m_Masque_Layer & CMP_LAYER ) /* Trace forme \ */
GRLine( &panel->m_ClipBox, DC, cx0 - dx0, cy0 - dx0,
cx0 + dx0, cy0 + dx0, 0, nc_color );
......@@ -741,7 +741,7 @@ int D_PAD::ReadDescr( FILE* File, int* LineNum )
int netcode;
nn = sscanf( PtLine, "%d", &netcode );
SetNet( netcode );
/* Lecture du netname */
ReadDelimitedText( BufLine, PtLine, sizeof(BufLine) );
m_Netname = CONV_FROM_UTF8( StrPurge( BufLine ) );
......@@ -799,7 +799,7 @@ bool D_PAD::Save( FILE* aFile ) const
fprintf( aFile, "Sh \"%.4s\" %c %d %d %d %d %d\n",
m_Padname, cshape, m_Size.x, m_Size.y,
m_DeltaSize.x, m_DeltaSize.y, m_Orient );
fprintf( aFile, "Dr %d %d %d", m_Drill.x, m_Offset.x, m_Offset.y );
if( m_DrillShape == PAD_OVAL )
{
......@@ -840,7 +840,7 @@ bool D_PAD::Save( FILE* aFile ) const
goto out;
rc = true;
out:
return rc;
}
......@@ -853,7 +853,7 @@ void D_PAD::Display_Infos( WinEDA_DrawFrame* frame )
/* Affiche en bas d'ecran les caract de la pastille demandee */
{
int ii;
MODULE* Module;
MODULE* module;
wxString Line;
int pos = 1;
......@@ -874,10 +874,10 @@ void D_PAD::Display_Infos( WinEDA_DrawFrame* frame )
frame->MsgPanel->EraseMsgBox();
/* Recherche du module correspondant */
Module = (MODULE*) m_Parent;
if( Module )
module = (MODULE*) m_Parent;
if( module )
{
wxString msg = Module->m_Reference->m_Text;
wxString msg = module->GetReference();
Affiche_1_Parametre( frame, pos, _( "Module" ), msg, DARKCYAN );
ReturnStringPadName( Line );
pos += 8;
......@@ -894,6 +894,7 @@ void D_PAD::Display_Infos( WinEDA_DrawFrame* frame )
#endif
wxString LayerInfo;
ii = 0;
if( m_Masque_Layer & CUIVRE_LAYER )
ii = 2;
......@@ -1002,7 +1003,7 @@ void D_PAD::Display_Infos( WinEDA_DrawFrame* frame )
}
int module_orient = Module ? Module->m_Orient : 0;
int module_orient = module ? module->m_Orient : 0;
if( module_orient )
Line.Printf( wxT( "%3.1f(+%3.1f)" ),
(float) (m_Orient - module_orient) / 10, (float) module_orient / 10 );
......@@ -1076,7 +1077,7 @@ bool D_PAD::HitTest( const wxPoint& ref_pos )
/************************************************************/
int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp )
int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp )
/************************************************************/
{
int diff;
......@@ -1096,7 +1097,7 @@ int D_PAD::Compare( const D_PAD* padref, const D_PAD* padcmp )
if( (diff = padref->m_DeltaSize.y - padcmp->m_DeltaSize.y) )
return diff;
// @todo check if export_gencad still works:
// @todo check if export_gencad still works:
// specctra_export needs this, but maybe export_gencad does not. added on Jan 24 2008 by Dick.
if( (diff = padref->m_Masque_Layer - padcmp->m_Masque_Layer) )
return diff;
......
......@@ -748,8 +748,9 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode )
// see class_track.h
void TRACK::Display_Infos( WinEDA_DrawFrame* frame )
{
wxString msg;
int text_pos;
wxString msg;
int text_pos;
BOARD* board = ((WinEDA_PcbFrame*)frame)->m_Pcb;
#ifdef RATSNET_DEBUG
DbgDisplayTrackInfos( this );
......@@ -779,11 +780,12 @@ void TRACK::Display_Infos( WinEDA_DrawFrame* frame )
/* Display NetName pour les segments de piste type cuivre */
text_pos += 15;
if( Type() == TYPETRACK
|| Type() == TYPEZONE
|| Type() == TYPEVIA )
{
EQUIPOT* equipot = ( (WinEDA_PcbFrame*) frame )->m_Pcb->FindNet( GetNet() );
EQUIPOT* equipot = board->FindNet( GetNet() );
if( equipot )
msg = equipot->m_Netname;
......@@ -824,11 +826,11 @@ void TRACK::Display_Infos( WinEDA_DrawFrame* frame )
int top_layer, bottom_layer;
Via->ReturnLayerPair( &top_layer, &bottom_layer );
msg = ReturnPcbLayerName( top_layer, TRUE ) + wxT( "/" )
+ ReturnPcbLayerName( bottom_layer, TRUE );
msg = board->GetLayerName( top_layer ) + wxT( "/" )
+ board->GetLayerName( bottom_layer );
}
else
msg = ReturnPcbLayerName( m_Layer );
msg = board->GetLayerName( m_Layer );
text_pos += 5;
Affiche_1_Parametre( frame, text_pos, _( "Layer" ), msg, BROWN );
......@@ -978,13 +980,18 @@ void SEGVIA::Show( int nestLevel, std::ostream& os )
int topLayer;
int botLayer;
BOARD* board = (BOARD*) m_Parent;
ReturnLayerPair( &topLayer, &botLayer );
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
" type=\"" << cp << '"' <<
" layers=\"" << ReturnPcbLayerName( topLayer ).Trim().mb_str() << ","
<< ReturnPcbLayerName( botLayer ).Trim().mb_str() << '"' <<
" type=\"" << cp << '"';
if( board )
os << " layers=\"" << board->GetLayerName( topLayer ).Trim().mb_str() << ","
<< board->GetLayerName( botLayer ).Trim().mb_str() << '"';
os <<
" width=\"" << m_Width << '"' <<
" drill=\"" << GetDrillValue() << '"' <<
" netcode=\"" << GetNet() << "\">" <<
......
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