Pcbnew: some enhancements

This commit is contained in:
charras 2009-03-26 19:27:50 +00:00
parent e5cbb935b0
commit 2eaa28f0cb
17 changed files with 358 additions and 1016 deletions

View File

@ -4,7 +4,7 @@ KiCad ChangeLog 2009
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2009-mar-16 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr> 2009-mar-23 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================ ================================================================================
++pcbnew: ++pcbnew:
in DRC: added test pads to holes. in DRC: added test pads to holes.

View File

@ -364,19 +364,19 @@ void GRSetDrawMode( wxDC* DC, int draw_mode )
{ {
if( draw_mode & GR_OR ) if( draw_mode & GR_OR )
#if defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS #if defined(__WXMAC__) && wxMAC_USE_CORE_GRAPHICS
DC->SetLogicalFunction( wxCOPY ); DC->SetLogicalFunction( wxCOPY );
#else #else
DC->SetLogicalFunction( wxOR ); DC->SetLogicalFunction( wxOR );
#endif #endif
else if( draw_mode & GR_XOR ) else if( draw_mode & GR_XOR )
DC->SetLogicalFunction( wxXOR ); DC->SetLogicalFunction( wxXOR );
else if( draw_mode & GR_NXOR ) else if( draw_mode & GR_NXOR )
DC->SetLogicalFunction( wxEQUIV ); #if defined (__WXMAC__) && wxMAC_USE_CORE_GRAPHICS
else DC->SetLogicalFunction( wxXOR );
#else
DC->SetLogicalFunction( wxEQUIV );
#endif
else
DC->SetLogicalFunction( wxCOPY ); DC->SetLogicalFunction( wxCOPY );
} }

View File

@ -3,7 +3,7 @@
#ifndef KICAD_BUILD_VERSION #ifndef KICAD_BUILD_VERSION
#define KICAD_BUILD_VERSION #define KICAD_BUILD_VERSION
#define BUILD_VERSION wxT("(20090332-unstable)") #define BUILD_VERSION wxT("(20090325-unstable)")
COMMON_GLOBL wxString g_BuildVersion COMMON_GLOBL wxString g_BuildVersion
#ifdef EDA_BASE #ifdef EDA_BASE

View File

@ -287,6 +287,12 @@ public:
bool DisplayPolarCood; bool DisplayPolarCood;
int DisplayZonesMode; int DisplayZonesMode;
int DisplayNetNamesMode; /* 0 do not show netnames,
* 1 show netnames on pads
* 2 show netnames on tracks
* 3 show netnames on tracks and pads
*/
bool Show_Modules_Cmp; bool Show_Modules_Cmp;
bool Show_Modules_Cu; bool Show_Modules_Cu;

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -163,6 +163,17 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
} }
} }
// if Contrast mode and a technical layer active, show pads on this layer
// so we can see pads on paste or solder layer
if( DisplayOpt.ContrastModeDisplay && screen->m_Active_Layer > LAST_COPPER_LAYER )
{
if( IsOnLayer( screen->m_Active_Layer ) )
color = g_DesignSettings.m_LayerColor[screen->m_Active_Layer];
else
color = DARKDARKGRAY;
}
if( draw_mode & GR_SURBRILL ) if( draw_mode & GR_SURBRILL )
{ {
if( draw_mode & GR_AND ) if( draw_mode & GR_AND )
@ -205,12 +216,12 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( DisplayIsol ) if( DisplayIsol )
{ {
GRCircle( &panel->m_ClipBox, GRCircle( &panel->m_ClipBox,
DC, DC,
xc, xc,
yc, yc,
dx + g_DesignSettings.m_TrackClearence, dx + g_DesignSettings.m_TrackClearence,
0, 0,
color ); color );
} }
break; break;
@ -233,14 +244,14 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( fillpad ) if( fillpad )
{ {
GRFillCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy, GRFillCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy,
ux0 - delta_cx, uy0 - delta_cy, ux0 - delta_cx, uy0 - delta_cy,
rotdx, color ); rotdx, color );
} }
else else
{ {
GRCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy, GRCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy,
ux0 - delta_cx, uy0 - delta_cy, ux0 - delta_cx, uy0 - delta_cy,
rotdx, color ); rotdx, color );
} }
/* Trace de la marge d'isolement */ /* Trace de la marge d'isolement */
@ -249,8 +260,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
rotdx = rotdx + g_DesignSettings.m_TrackClearence + g_DesignSettings.m_TrackClearence; rotdx = rotdx + g_DesignSettings.m_TrackClearence + g_DesignSettings.m_TrackClearence;
GRCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy, GRCSegm( &panel->m_ClipBox, DC, ux0 + delta_cx, uy0 + delta_cy,
ux0 - delta_cx, uy0 - delta_cy, ux0 - delta_cx, uy0 - delta_cy,
rotdx, color ); rotdx, color );
} }
break; break;
@ -363,8 +374,8 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
RotatePoint( &delta_cx, &delta_cy, angle ); RotatePoint( &delta_cx, &delta_cy, angle );
GRFillCSegm( &panel->m_ClipBox, DC, cx0 + delta_cx, cy0 + delta_cy, GRFillCSegm( &panel->m_ClipBox, DC, cx0 + delta_cx, cy0 + delta_cy,
cx0 - delta_cx, cy0 - delta_cy, cx0 - delta_cx, cy0 - delta_cy,
rotdx, color ); rotdx, color );
break; break;
default: default:
@ -385,21 +396,31 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( m_Masque_Layer & CMP_LAYER ) /* Trace forme \ */ if( m_Masque_Layer & CMP_LAYER ) /* Trace forme \ */
GRLine( &panel->m_ClipBox, DC, cx0 - dx0, cy0 - dx0, GRLine( &panel->m_ClipBox, DC, cx0 - dx0, cy0 - dx0,
cx0 + dx0, cy0 + dx0, 0, nc_color ); cx0 + dx0, cy0 + dx0, 0, nc_color );
if( m_Masque_Layer & CUIVRE_LAYER ) /* Trace forme / */ if( m_Masque_Layer & CUIVRE_LAYER ) /* Trace forme / */
GRLine( &panel->m_ClipBox, DC, cx0 + dx0, cy0 - dx0, GRLine( &panel->m_ClipBox, DC, cx0 + dx0, cy0 - dx0,
cx0 - dx0, cy0 + dx0, 0, nc_color ); cx0 - dx0, cy0 + dx0, 0, nc_color );
} }
/* Draw the pad number */ /* Draw the pad number */
bool display_padnum = true;
if( frame && !frame->m_DisplayPadNum ) if( frame && !frame->m_DisplayPadNum )
display_padnum = false;
bool display_netname = true;
if( (DisplayOpt.DisplayNetNamesMode == 0) || (DisplayOpt.DisplayNetNamesMode == 2) )
display_netname = false;
if( !display_padnum && !display_netname )
return; return;
wxPoint tpos0 = wxPoint( ux0, uy0 ); // Position of the centre of text wxPoint tpos0 = wxPoint( ux0, uy0 ); // Position of the centre of text
wxPoint tpos = tpos0; wxPoint tpos = tpos0;
wxSize AreaSize; // size of text area, normalized to AreaSize.y < AreaSize.x wxSize AreaSize; // size of text area, normalized to AreaSize.y < AreaSize.x
int shortname_len = m_ShortNetname.Len(); int shortname_len = m_ShortNetname.Len();
if( ! display_netname )
shortname_len = 0;
if( GetShape() == PAD_CIRCLE ) if( GetShape() == PAD_CIRCLE )
angle = 0; angle = 0;
AreaSize = m_Size; AreaSize = m_Size;
@ -410,7 +431,7 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
AreaSize.y = m_Size.x; AreaSize.y = m_Size.x;
} }
if( shortname_len > 0 ) // if there is a netname, provides room to display this netname if( shortname_len > 0 ) // if there is a netname, provides room to display this netname
{ {
AreaSize.y /= 2; // Text used only the upper area of the pad. The lower area displays the net name AreaSize.y /= 2; // Text used only the upper area of the pad. The lower area displays the net name
tpos.y -= AreaSize.y / 2; tpos.y -= AreaSize.y / 2;
@ -424,42 +445,48 @@ void D_PAD::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
NORMALIZE_ANGLE_90( t_angle ); NORMALIZE_ANGLE_90( t_angle );
/* Note: in next calculations, texte size is calculated for 3 or more chars. /* Note: in next calculations, texte size is calculated for 3 or more chars.
Of course, pads numbers and nets names can have less than 3 chars. * Of course, pads numbers and nets names can have less than 3 chars.
but after some tries, i found this is gives the best look * but after some tries, i found this is gives the best look
*/ */
#define MIN_CHAR_COUNT 3 #define MIN_CHAR_COUNT 3
wxString buffer; wxString buffer;
ReturnStringPadName( buffer );
int numpad_len = buffer.Len();
numpad_len = MAX( numpad_len, MIN_CHAR_COUNT);
int tsize = min( AreaSize.y, AreaSize.x / numpad_len ); int tsize;
#define CHAR_SIZE_MIN 5 if( display_padnum )
if( screen->Scale( tsize ) >= CHAR_SIZE_MIN ) // Not drawable when size too small.
{ {
tsize = (int) (tsize * 0.8); // reserve room for marges and segments thickness ReturnStringPadName( buffer );
int numpad_len = buffer.Len();
numpad_len = MAX( numpad_len, MIN_CHAR_COUNT );
DrawGraphicText( panel, DC, tpos, tsize = min( AreaSize.y, AreaSize.x / numpad_len );
WHITE, buffer, t_angle, wxSize( tsize, tsize ), #define CHAR_SIZE_MIN 5
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7 ); if( screen->Scale( tsize ) >= CHAR_SIZE_MIN ) // Not drawable when size too small.
{
tsize = (int) (tsize * 0.8); // reserve room for marges and segments thickness
DrawGraphicText( panel, DC, tpos,
WHITE, buffer, t_angle, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7 );
}
} }
// display the short netnam, if exists // display the short netname, if exists
if (shortname_len == 0 ) if( shortname_len == 0 )
return; return;
shortname_len = MAX( shortname_len, MIN_CHAR_COUNT);
shortname_len = MAX( shortname_len, MIN_CHAR_COUNT );
tsize = min( AreaSize.y, AreaSize.x / shortname_len ); tsize = min( AreaSize.y, AreaSize.x / shortname_len );
if( screen->Scale( tsize ) >= CHAR_SIZE_MIN ) // Not drawable in size too small. if( screen->Scale( tsize ) >= CHAR_SIZE_MIN ) // Not drawable in size too small.
{ {
tpos = tpos0; tpos = tpos0;
tpos.y += AreaSize.y / 2; if ( display_padnum )
tpos.y += AreaSize.y / 2;
RotatePoint( &tpos, wxPoint( ux0, uy0 ), angle ); RotatePoint( &tpos, wxPoint( ux0, uy0 ), angle );
tsize = (int) (tsize * 0.8); // reserve room for marges and segments thickness tsize = (int) (tsize * 0.8); // reserve room for marges and segments thickness
DrawGraphicText( panel, DC, tpos, DrawGraphicText( panel, DC, tpos,
WHITE, m_ShortNetname, t_angle, wxSize( tsize, tsize ), WHITE, m_ShortNetname, t_angle, wxSize( tsize, tsize ),
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7 ); GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, tsize / 7 );
} }
} }

View File

@ -650,6 +650,9 @@ void TRACK::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoin
if( Type() == TYPE_ZONE ) if( Type() == TYPE_ZONE )
return; return;
if ( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
return;
#define THRESHOLD 10 #define THRESHOLD 10
if( (m_End.x - m_Start.x) != 0 && (m_End.y - m_Start.y) != 0 ) if( (m_End.x - m_Start.x) != 0 && (m_End.y - m_Start.y) != 0 )
return; return;
@ -821,6 +824,8 @@ void SEGVIA::Draw( WinEDA_DrawPanel* panel, wxDC* DC, int draw_mode, const wxPoi
// Display the short netname: // Display the short netname:
if( GetNet() == 0 ) if( GetNet() == 0 )
return; return;
if ( DisplayOpt.DisplayNetNamesMode == 0 || DisplayOpt.DisplayNetNamesMode == 1 )
return;
EQUIPOT* net = ( (BOARD*) GetParent() )->FindNet( GetNet() ); EQUIPOT* net = ( (BOARD*) GetParent() )->FindNet( GetNet() );
if( net == NULL ) if( net == NULL )
return; return;

View File

@ -146,9 +146,13 @@ DISPLAY_OPTIONS::DISPLAY_OPTIONS()
m_DisplayViaMode = VIA_HOLE_NOT_SHOW; m_DisplayViaMode = VIA_HOLE_NOT_SHOW;
DisplayPolarCood = TRUE; DisplayPolarCood = TRUE;
DisplayZonesMode = 0; // 0 = Show filled areas outlines in zones, DisplayZonesMode = 0; /* 0 = Show filled areas outlines in zones,
// 1 = do not show filled areas outlines * 1 = do not show filled areas outlines
// 2 = show outlines of filled areas * 2 = show outlines of filled areas */
DisplayNetNamesMode = 3; /* 0 do not show netnames,
* 1 show netnames on pads
* 2 show netnames on tracks
* 3 show netnames on tracks and pads */
Show_Modules_Cmp = TRUE; Show_Modules_Cmp = TRUE;
Show_Modules_Cu = TRUE; Show_Modules_Cu = TRUE;

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Feb 8 2009) // C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -22,25 +22,44 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
wxString m_OptDisplayTracksChoices[] = { _("Sketch"), _("Filled") }; wxString m_OptDisplayTracksChoices[] = { _("Sketch"), _("Filled") };
int m_OptDisplayTracksNChoices = sizeof( m_OptDisplayTracksChoices ) / sizeof( wxString ); int m_OptDisplayTracksNChoices = sizeof( m_OptDisplayTracksChoices ) / sizeof( wxString );
m_OptDisplayTracks = new wxRadioBox( this, wxID_DISPLAY_TRACK, _("Tracks:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksNChoices, m_OptDisplayTracksChoices, 1, wxRA_SPECIFY_COLS ); m_OptDisplayTracks = new wxRadioBox( this, wxID_DISPLAY_TRACK, _("Tracks:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksNChoices, m_OptDisplayTracksChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayTracks->SetSelection( 0 ); m_OptDisplayTracks->SetSelection( 1 );
m_OptDisplayTracks->SetToolTip( _("Select how tracks are displayed") );
sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL|wxEXPAND, 5 ); sLeftBoxSizer->Add( m_OptDisplayTracks, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayTracksClearanceChoices[] = { _("Always"), _("New track"), _("Never") }; wxString m_OptDisplayTracksClearanceChoices[] = { _("Always"), _("New track"), _("Never") };
int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString ); int m_OptDisplayTracksClearanceNChoices = sizeof( m_OptDisplayTracksClearanceChoices ) / sizeof( wxString );
m_OptDisplayTracksClearance = new wxRadioBox( this, ID_SHOW_CLEARANCE, _("Show Tracks Clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS ); m_OptDisplayTracksClearance = new wxRadioBox( this, ID_SHOW_CLEARANCE, _("Show Tracks Clearance:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayTracksClearanceNChoices, m_OptDisplayTracksClearanceChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayTracksClearance->SetSelection( 1 ); m_OptDisplayTracksClearance->SetSelection( 1 );
m_OptDisplayTracksClearance->SetToolTip( _("Show( or not) tracks clearance area.\nIf New track is selected, track clearance area is shown only when creating the track.") );
sLeftBoxSizer->Add( m_OptDisplayTracksClearance, 0, wxALL|wxEXPAND, 5 ); sLeftBoxSizer->Add( m_OptDisplayTracksClearance, 0, wxALL|wxEXPAND, 5 );
wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("defined holes"), _("Always") }; wxString m_OptDisplayViaHoleChoices[] = { _("Never"), _("Defined Holes"), _("Always") };
int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString ); int m_OptDisplayViaHoleNChoices = sizeof( m_OptDisplayViaHoleChoices ) / sizeof( wxString );
m_OptDisplayViaHole = new wxRadioBox( this, ID_VIAS_HOLES, _("Show Via Holes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViaHoleNChoices, m_OptDisplayViaHoleChoices, 1, wxRA_SPECIFY_COLS ); m_OptDisplayViaHole = new wxRadioBox( this, ID_VIAS_HOLES, _("Show Via Holes:"), wxDefaultPosition, wxDefaultSize, m_OptDisplayViaHoleNChoices, m_OptDisplayViaHoleChoices, 1, wxRA_SPECIFY_COLS );
m_OptDisplayViaHole->SetSelection( 1 ); m_OptDisplayViaHole->SetSelection( 1 );
m_OptDisplayViaHole->SetToolTip( _("Show (or not) via holes.\nIf Defined Holes is selected, only the non default size holes are shown") );
sLeftBoxSizer->Add( m_OptDisplayViaHole, 0, wxALL|wxEXPAND, 5 ); sLeftBoxSizer->Add( m_OptDisplayViaHole, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND, 5 ); bMainSizer->Add( sLeftBoxSizer, 0, wxEXPAND|wxALL, 5 );
wxStaticBoxSizer* sMiddleSizer; wxStaticBoxSizer* sbMiddleLeftSizer;
sMiddleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxHORIZONTAL ); sbMiddleLeftSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Net Names:") ), wxVERTICAL );
wxString m_ShowNetNamesOptionChoices[] = { _("Do Not Show"), _("On Pads"), _("OnTracks"), _("On Pads and Tracks") };
int m_ShowNetNamesOptionNChoices = sizeof( m_ShowNetNamesOptionChoices ) / sizeof( wxString );
m_ShowNetNamesOption = new wxRadioBox( this, wxID_ANY, _("Show Net Names:"), wxDefaultPosition, wxDefaultSize, m_ShowNetNamesOptionNChoices, m_ShowNetNamesOptionChoices, 1, wxRA_SPECIFY_COLS );
m_ShowNetNamesOption->SetSelection( 3 );
m_ShowNetNamesOption->SetToolTip( _("Show or not net names on pads and/or tracks") );
sbMiddleLeftSizer->Add( m_ShowNetNamesOption, 0, wxALL, 5 );
bMainSizer->Add( sbMiddleLeftSizer, 0, wxALL|wxEXPAND, 5 );
wxStaticBoxSizer* sMiddleRightSizer;
sMiddleRightSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Footprints:") ), wxHORIZONTAL );
wxBoxSizer* bLModuleSizer; wxBoxSizer* bLModuleSizer;
bLModuleSizer = new wxBoxSizer( wxVERTICAL ); bLModuleSizer = new wxBoxSizer( wxVERTICAL );
@ -57,7 +76,7 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
m_OptDisplayModTexts->SetSelection( 1 ); m_OptDisplayModTexts->SetSelection( 1 );
bLModuleSizer->Add( m_OptDisplayModTexts, 0, wxALL|wxEXPAND, 5 ); bLModuleSizer->Add( m_OptDisplayModTexts, 0, wxALL|wxEXPAND, 5 );
sMiddleSizer->Add( bLModuleSizer, 0, 0, 5 ); sMiddleRightSizer->Add( bLModuleSizer, 0, 0, 5 );
wxStaticBoxSizer* bRModuleSizer; wxStaticBoxSizer* bRModuleSizer;
bRModuleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Options:") ), wxVERTICAL ); bRModuleSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pad Options:") ), wxVERTICAL );
@ -69,19 +88,22 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 ); bRModuleSizer->Add( m_OptDisplayPads, 0, wxALL|wxEXPAND, 5 );
m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show Pad Clearance"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadClearence = new wxCheckBox( this, wxID_ANY, _("Show Pad Clearance"), wxDefaultPosition, wxDefaultSize, 0 );
bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 ); bRModuleSizer->Add( m_OptDisplayPadClearence, 0, wxALL, 5 );
m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show Pad Number"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadNumber = new wxCheckBox( this, wxID_ANY, _("Show Pad Number"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayPadNumber->SetValue(true); m_OptDisplayPadNumber->SetValue(true);
bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 ); bRModuleSizer->Add( m_OptDisplayPadNumber, 0, wxALL, 5 );
m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show Pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 ); m_OptDisplayPadNoConn = new wxCheckBox( this, wxID_ANY, _("Show Pad NoConnect"), wxDefaultPosition, wxDefaultSize, 0 );
m_OptDisplayPadNoConn->SetValue(true); m_OptDisplayPadNoConn->SetValue(true);
bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 ); bRModuleSizer->Add( m_OptDisplayPadNoConn, 0, wxALL, 5 );
sMiddleSizer->Add( bRModuleSizer, 0, 0, 5 ); sMiddleRightSizer->Add( bRModuleSizer, 0, 0, 5 );
bMainSizer->Add( sMiddleSizer, 0, wxEXPAND, 5 ); bMainSizer->Add( sMiddleRightSizer, 0, wxEXPAND|wxALL, 5 );
wxBoxSizer* bRightSizer; wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL ); bRightSizer = new wxBoxSizer( wxVERTICAL );
@ -116,7 +138,7 @@ DialogDisplayOptions_base::DialogDisplayOptions_base( wxWindow* parent, wxWindow
bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 ); bRightSizer->Add( m_buttonCANCEL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxEXPAND, 5 );
bMainSizer->Add( bRightSizer, 0, wxEXPAND, 5 ); bMainSizer->Add( bRightSizer, 0, wxEXPAND|wxALL, 5 );
this->SetSizer( bMainSizer ); this->SetSizer( bMainSizer );
this->Layout(); this->Layout();

View File

@ -7,7 +7,6 @@
<property name="disconnect_events">1</property> <property name="disconnect_events">1</property>
<property name="encoding">UTF-8</property> <property name="encoding">UTF-8</property>
<property name="event_generation">connect</property> <property name="event_generation">connect</property>
<property name="event_handler">impl_virtual</property>
<property name="file">dialog_display_options_base</property> <property name="file">dialog_display_options_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
@ -33,15 +32,11 @@
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">DialogDisplayOptions_base</property> <property name="name">DialogDisplayOptions_base</property>
<property name="pos"></property> <property name="pos"></property>
<property name="size">559,303</property> <property name="size">731,331</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="title"></property> <property name="title"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -82,7 +77,7 @@
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
@ -112,15 +107,11 @@
<property name="name">m_OptDisplayTracks</property> <property name="name">m_OptDisplayTracks</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos"></property>
<property name="selection">0</property> <property name="selection">1</property>
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip">Select how tracks are displayed</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -174,11 +165,7 @@
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip">Show( or not) tracks clearance area.&#x0A;If New track is selected, track clearance area is shown only when creating the track.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -214,7 +201,7 @@
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxRadioBox" expanded="1"> <object class="wxRadioBox" expanded="1">
<property name="bg"></property> <property name="bg"></property>
<property name="choices">&quot;Never&quot; &quot;defined holes&quot; &quot;Always&quot;</property> <property name="choices">&quot;Never&quot; &quot;Defined Holes&quot; &quot;Always&quot;</property>
<property name="context_help"></property> <property name="context_help"></property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg"></property>
@ -232,11 +219,7 @@
<property name="size"></property> <property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip">Show (or not) via holes.&#x0A;If Defined Holes is selected, only the non default size holes are shown</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -270,13 +253,81 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Net Names:</property>
<property name="minimum_size"></property>
<property name="name">sbMiddleLeftSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxRadioBox" expanded="1">
<property name="bg"></property>
<property name="choices">&quot;Do Not Show&quot; &quot;On Pads&quot; &quot;OnTracks&quot; &quot;On Pads and Tracks&quot;</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show Net Names:</property>
<property name="majorDimension">1</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_ShowNetNamesOption</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="selection">3</property>
<property name="size"></property>
<property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property>
<property name="tooltip">Show or not net names on pads and/or tracks</property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRadioBox"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Footprints:</property> <property name="label">Footprints:</property>
<property name="minimum_size"></property> <property name="minimum_size"></property>
<property name="name">sMiddleSizer</property> <property name="name">sMiddleRightSizer</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<event name="OnUpdateUI"></event> <event name="OnUpdateUI"></event>
@ -314,10 +365,6 @@
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -372,10 +419,6 @@
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -444,10 +487,6 @@
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -500,10 +539,6 @@
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -556,10 +591,6 @@
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -612,10 +643,6 @@
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -651,7 +678,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -695,10 +722,6 @@
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -753,10 +776,6 @@
<property name="style">wxRA_SPECIFY_COLS</property> <property name="style">wxRA_SPECIFY_COLS</property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -821,10 +840,6 @@
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>
@ -877,10 +892,6 @@
<property name="style"></property> <property name="style"></property>
<property name="subclass"></property> <property name="subclass"></property>
<property name="tooltip"></property> <property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property> <property name="window_extra_style"></property>
<property name="window_name"></property> <property name="window_name"></property>
<property name="window_style"></property> <property name="window_style"></property>

View File

@ -1,5 +1,5 @@
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Feb 8 2009) // C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/ // http://www.wxformbuilder.org/
// //
// PLEASE DO "NOT" EDIT THIS FILE! // PLEASE DO "NOT" EDIT THIS FILE!
@ -45,6 +45,7 @@ class DialogDisplayOptions_base : public wxDialog
wxRadioBox* m_OptDisplayTracks; wxRadioBox* m_OptDisplayTracks;
wxRadioBox* m_OptDisplayTracksClearance; wxRadioBox* m_OptDisplayTracksClearance;
wxRadioBox* m_OptDisplayViaHole; wxRadioBox* m_OptDisplayViaHole;
wxRadioBox* m_ShowNetNamesOption;
wxRadioBox* m_OptDisplayModEdges; wxRadioBox* m_OptDisplayModEdges;
wxRadioBox* m_OptDisplayModTexts; wxRadioBox* m_OptDisplayModTexts;
wxRadioBox* m_OptDisplayPads; wxRadioBox* m_OptDisplayPads;
@ -58,13 +59,12 @@ class DialogDisplayOptions_base : public wxDialog
wxButton* m_buttonCANCEL; wxButton* m_buttonCANCEL;
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
public: public:
DialogDisplayOptions_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 731,331 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
DialogDisplayOptions_base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 559,303 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DialogDisplayOptions_base(); ~DialogDisplayOptions_base();
}; };

View File

@ -165,6 +165,7 @@ void Dialog_Display_Options::init()
m_OptDisplayPadNumber->SetValue( DisplayOpt.DisplayPadNum ); m_OptDisplayPadNumber->SetValue( DisplayOpt.DisplayPadNum );
m_OptDisplayPadNoConn->SetValue( DisplayOpt.DisplayPadNoConn ); m_OptDisplayPadNoConn->SetValue( DisplayOpt.DisplayPadNoConn );
m_OptDisplayDrawings->SetSelection( DisplayOpt.DisplayDrawItems ); m_OptDisplayDrawings->SetSelection( DisplayOpt.DisplayDrawItems );
m_ShowNetNamesOption->SetSelection( DisplayOpt.DisplayNetNamesMode);
if( GetSizer() ) if( GetSizer() )
{ {
@ -229,6 +230,8 @@ void Dialog_Display_Options::OnOkClick(wxCommandEvent& event)
DisplayOpt.DisplayPadNoConn = m_OptDisplayPadNoConn->GetValue(); DisplayOpt.DisplayPadNoConn = m_OptDisplayPadNoConn->GetValue();
DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection(); DisplayOpt.DisplayDrawItems = m_OptDisplayDrawings->GetSelection();
DisplayOpt.DisplayNetNamesMode = m_ShowNetNamesOption->GetSelection();
m_Parent->DrawPanel->Refresh(TRUE); m_Parent->DrawPanel->Refresh(TRUE);

View File

@ -174,8 +174,8 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
item->SetBitmap( library_xpm ); item->SetBitmap( library_xpm );
configmenu->Append( item ); configmenu->Append( item );
item = new wxMenuItem( configmenu, ID_COLORS_SETUP, _( "&Colors" ), item = new wxMenuItem( configmenu, ID_COLORS_SETUP, _( "&Colors and Visibility" ),
_( "Select colors and display for board items" ) ); _( "Select colors and visibilty of layers and some items" ) );
item->SetBitmap( palette_xpm ); item->SetBitmap( palette_xpm );
configmenu->Append( item ); configmenu->Append( item );
@ -185,7 +185,7 @@ void WinEDA_PcbFrame::ReCreateMenuBar()
configmenu->Append( item ); configmenu->Append( item );
item = new wxMenuItem( configmenu, ID_PCB_LOOK_SETUP, _( "&Display" ), item = new wxMenuItem( configmenu, ID_PCB_LOOK_SETUP, _( "&Display" ),
_( "Select what items are displayed" ) ); _( "Select how items (pads, tracks texts ... ) are displayed" ) );
item->SetBitmap( display_options_xpm ); item->SetBitmap( display_options_xpm );
configmenu->Append( item ); configmenu->Append( item );

View File

@ -104,6 +104,16 @@ static PARAM_CFG_INT ViaShowHoleCfg
OPT_VIA_HOLE_END - 1 /* Min and max values*/ OPT_VIA_HOLE_END - 1 /* Min and max values*/
); );
static PARAM_CFG_INT ShowNetNamesModeCfg
(
INSETUP,
wxT( "ShowNetNamesMode" ), /* Keyword */
&DisplayOpt.DisplayNetNamesMode, /* Parameter address */
3, /* Default value */
0, /* Min and max values*/
3 /* Min and max values*/
);
static PARAM_CFG_INT TrackClearenceCfg static PARAM_CFG_INT TrackClearenceCfg
( (
wxT( "Isol" ), /* Keyword */ wxT( "Isol" ), /* Keyword */
@ -227,7 +237,7 @@ static PARAM_CFG_INT AfficheContourModuleCfg // Module Edges: fill/line/sketc
INSETUP, INSETUP,
wxT( "ModAffC" ), /* Keyword */ wxT( "ModAffC" ), /* Keyword */
&DisplayOpt.DisplayModEdge, /* Parameter address */ &DisplayOpt.DisplayModEdge, /* Parameter address */
FILLED, /* Default value */ FILLED, /* Default value */
0, 2 /* Min and max values*/ 0, 2 /* Min and max values*/
); );
@ -236,7 +246,7 @@ static PARAM_CFG_INT AfficheTexteModuleCfg // Module Texts: fill/line/sketch
INSETUP, INSETUP,
wxT( "ModAffT" ), /* Keyword */ wxT( "ModAffT" ), /* Keyword */
&DisplayOpt.DisplayModText, /* Parameter address */ &DisplayOpt.DisplayModText, /* Parameter address */
FILLED, /* Default value */ FILLED, /* Default value */
0, 2 /* Min and max values*/ 0, 2 /* Min and max values*/
); );
@ -245,7 +255,7 @@ static PARAM_CFG_INT AfficheTextePcbCfg // PCB Texts: fill/line/sketch
INSETUP, INSETUP,
wxT( "PcbAffT" ), /* Keyword */ wxT( "PcbAffT" ), /* Keyword */
&DisplayOpt.DisplayDrawItems, /* Parameter address */ &DisplayOpt.DisplayDrawItems, /* Parameter address */
FILLED, /* Default value */ FILLED, /* Default value */
0, 2 /* Min and max values*/ 0, 2 /* Min and max values*/
); );
@ -788,7 +798,7 @@ static PARAM_CFG_BOOL TwoSegmentTrackBuildCfg
/* parameters in this list will be saved on request (when saving config). /* parameters in this list will be saved on request (when saving config).
*/ */
PARAM_CFG_BASE* ParamCfgList[] = PARAM_CFG_BASE* ParamCfgList[] =
{ {
&UserLibDirBufCfg, &UserLibDirBufCfg,
@ -802,6 +812,7 @@ PARAM_CFG_BASE* ParamCfgList[] =
&MicroViaDiametreCfg, &MicroViaDiametreCfg,
&MicroViaDrillCfg, &MicroViaDrillCfg,
&ViaShowHoleCfg, &ViaShowHoleCfg,
&ShowNetNamesModeCfg,
&TrackClearenceCfg, &TrackClearenceCfg,
&LayerCountCfg, &LayerCountCfg,
&TrackWidthCfg, &TrackWidthCfg,

View File

@ -156,7 +156,7 @@ void WinEDA_SetColorsFrame::CreateControls()
MainBoxSizer->Add(FlexColumnBoxSizer, 1, wxGROW|wxLEFT|wxBOTTOM, 5); MainBoxSizer->Add(FlexColumnBoxSizer, 1, wxGROW|wxLEFT|wxBOTTOM, 5);
// Add a text string to identify the controls within this column. // Add a text string to identify the controls within this column.
Label = new wxStaticText( this, wxID_STATIC, laytool_index[cln]->m_Name, Label = new wxStaticText( this, wxID_STATIC, wxGetTranslation(laytool_index[cln]->m_Name),
wxDefaultPosition, wxDefaultSize, 0 ); wxDefaultPosition, wxDefaultSize, 0 );
// Make this text string bold (so that it stands out better). // Make this text string bold (so that it stands out better).
@ -209,15 +209,17 @@ void WinEDA_SetColorsFrame::CreateControls()
RowBoxSizer->Add(BUTT_SIZE_X, BUTT_SIZE_Y, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5); RowBoxSizer->Add(BUTT_SIZE_X, BUTT_SIZE_Y, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxBOTTOM, 5);
} }
// Note: When setting texts, we must call wxGetTranslation( ) for all statically created texts
// if we want them translated
if( laytool_list[lyr]->m_LayerNumber >= 0 ) if( laytool_list[lyr]->m_LayerNumber >= 0 )
{ {
if( laytool_list[lyr]->m_Title == wxT( "*" ) ) if( laytool_list[lyr]->m_Title == wxT( "*" ) )
msg = g_ViaType_Name[laytool_list[lyr]->m_LayerNumber]; msg = wxGetTranslation( g_ViaType_Name[laytool_list[lyr]->m_LayerNumber]);
else else
msg = m_Parent->GetBoard()->GetLayerName( laytool_list[lyr]->m_LayerNumber ); msg = m_Parent->GetBoard()->GetLayerName( laytool_list[lyr]->m_LayerNumber );
} }
else else
msg = wxGetTranslation( laytool_list[lyr]->m_Title.GetData() ); msg = wxGetTranslation( laytool_list[lyr]->m_Title );
CheckBox = new wxCheckBox( this, ID_COLOR_CHECKBOX_ONOFF, msg, CheckBox = new wxCheckBox( this, ID_COLOR_CHECKBOX_ONOFF, msg,
wxDefaultPosition, wxDefaultSize, wxCHK_2STATE ); wxDefaultPosition, wxDefaultSize, wxCHK_2STATE );

View File

@ -324,7 +324,7 @@ static ColorButton Layer_29_Butt =
static ButtonIndex Msg_Others_Items = static ButtonIndex Msg_Others_Items =
{ {
wxT( "Others" ), // Title _( "Others" ), // Title
43 // Index to last bitmap button in group 43 // Index to last bitmap button in group
}; };