Beautification, Doxyfile edits

This commit is contained in:
dickelbeck 2008-03-04 14:27:48 +00:00
parent 0dc3be8806
commit 3d73eb6823
5 changed files with 737 additions and 1702 deletions

1069
Doxyfile

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
/******************************************************************/
/* basicframe.cpp - fonctions des classes du type WinEDA_BasicFrame */
/******************************************************************/
/******************************************************************/
/* basicframe.cpp - fonctions des classes du type WinEDA_BasicFrame */
/******************************************************************/
#ifdef __GNUG__
#pragma implementation
@ -12,20 +12,20 @@
#include "id.h"
/*******************************************************/
/* Constructeur de WinEDA_BasicFrame: la fenetre generale */
/*******************************************************/
/*******************************************************/
/* Constructeur de WinEDA_BasicFrame: la fenetre generale */
/*******************************************************/
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow * father, int idtype,
WinEDA_App *parent, const wxString & title,
const wxPoint& pos, const wxSize& size, long style):
wxFrame(father, -1, title, pos, size, style )
WinEDA_BasicFrame::WinEDA_BasicFrame( wxWindow* father, int idtype,
WinEDA_App* parent, const wxString& title,
const wxPoint& pos, const wxSize& size, long style ) :
wxFrame( father, -1, title, pos, size, style )
{
wxSize minsize;
wxSize minsize;
m_Ident = idtype;
m_Parent = parent;
SetFont(*g_StdFont);
SetFont( *g_StdFont );
m_MenuBar = NULL; // menu du haut d'ecran
m_HToolBar = NULL;
m_FrameIsActive = TRUE;
@ -33,30 +33,34 @@ wxSize minsize;
minsize.x = 470;
minsize.y = 350 + m_MsgFrameHeight;
SetSizeHints( minsize.x, minsize.y, -1,-1, -1,-1);
SetSizeHints( minsize.x, minsize.y, -1, -1, -1, -1 );
/* Verification des parametres de creation */
if ( (size.x < minsize.x) || (size.y < minsize.y) )
SetSize(0,0, minsize.x, minsize.y);
if( (size.x < minsize.x) || (size.y < minsize.y) )
SetSize( 0, 0, minsize.x, minsize.y );
// Create child subwindows.
GetClientSize(&m_FrameSize.x, &m_FrameSize.y); /* dimx, dimy = dimensions utiles de la
zone utilisateur de la fenetre principale */
GetClientSize( &m_FrameSize.x, &m_FrameSize.y ); /* dimx, dimy = dimensions utiles de la
* zone utilisateur de la fenetre principale */
m_FramePos.x = m_FramePos.y = 0;
m_FrameSize.y -= m_MsgFrameHeight;
}
/******************************************/
WinEDA_BasicFrame::~WinEDA_BasicFrame()
/******************************************/
{
if ( m_Parent->m_HtmlCtrl ) delete m_Parent->m_HtmlCtrl;
if( m_Parent->m_HtmlCtrl )
delete m_Parent->m_HtmlCtrl;
m_Parent->m_HtmlCtrl = NULL;
}
/********************************************/
void WinEDA_BasicFrame::ReCreateMenuBar()
/********************************************/
// Virtual function
{
}
@ -66,29 +70,31 @@ void WinEDA_BasicFrame::ReCreateMenuBar()
void WinEDA_BasicFrame::GetSettings()
/*********************************************/
{
wxString text;
int Ypos_min;
wxString text;
int Ypos_min;
if( m_Parent->m_EDA_Config )
{
text = m_FrameName + wxT("Pos_x");
m_Parent->m_EDA_Config->Read(text, &m_FramePos.x);
text = m_FrameName + wxT("Pos_y");
m_Parent->m_EDA_Config->Read(text, &m_FramePos.y);
text = m_FrameName + wxT("Size_x");
m_Parent->m_EDA_Config->Read(text, &m_FrameSize.x, 600);
text = m_FrameName + wxT("Size_y");
m_Parent->m_EDA_Config->Read(text, &m_FrameSize.y, 400);
text = m_FrameName + wxT( "Pos_x" );
m_Parent->m_EDA_Config->Read( text, &m_FramePos.x );
text = m_FrameName + wxT( "Pos_y" );
m_Parent->m_EDA_Config->Read( text, &m_FramePos.y );
text = m_FrameName + wxT( "Size_x" );
m_Parent->m_EDA_Config->Read( text, &m_FrameSize.x, 600 );
text = m_FrameName + wxT( "Size_y" );
m_Parent->m_EDA_Config->Read( text, &m_FrameSize.y, 400 );
}
// Ensure Window title bar is visible
#ifdef __WXMAC__
// for macOSX, the window must be below system (macOSX) toolbar
Ypos_min = GetMBarHeight();
#else
Ypos_min = 0;
#endif
if ( m_FramePos.y < Ypos_min ) m_FramePos.y = Ypos_min;
if( m_FramePos.y < Ypos_min )
m_FramePos.y = Ypos_min;
}
@ -96,181 +102,191 @@ int Ypos_min;
void WinEDA_BasicFrame::SaveSettings()
/*****************************************/
{
wxString text;
wxString text;
if ( !m_Parent || !m_Parent->m_EDA_Config ) return;
if( !m_Parent || !m_Parent->m_EDA_Config )
return;
if( ! m_Parent->m_EDA_Config || IsIconized() ) return;
if( !m_Parent->m_EDA_Config || IsIconized() )
return;
m_FrameSize = GetSize();
m_FramePos = GetPosition();
text = m_FrameName + wxT("Pos_x");
m_Parent->m_EDA_Config->Write(text, (long)m_FramePos.x);
text = m_FrameName + wxT("Pos_y");
m_Parent->m_EDA_Config->Write(text, (long)m_FramePos.y);
text = m_FrameName + wxT("Size_x");
m_Parent->m_EDA_Config->Write(text, (long)m_FrameSize.x);
text = m_FrameName + wxT("Size_y");
m_Parent->m_EDA_Config->Write(text, (long)m_FrameSize.y);
text = m_FrameName + wxT( "Pos_x" );
m_Parent->m_EDA_Config->Write( text, (long) m_FramePos.x );
text = m_FrameName + wxT( "Pos_y" );
m_Parent->m_EDA_Config->Write( text, (long) m_FramePos.y );
text = m_FrameName + wxT( "Size_x" );
m_Parent->m_EDA_Config->Write( text, (long) m_FrameSize.x );
text = m_FrameName + wxT( "Size_y" );
m_Parent->m_EDA_Config->Write( text, (long) m_FrameSize.y );
}
/******************************************************/
void WinEDA_BasicFrame::PrintMsg(const wxString & text)
void WinEDA_BasicFrame::PrintMsg( const wxString& text )
/******************************************************/
{
SetStatusText(text);
SetStatusText( text );
#ifdef DEBUG
printf("%s\n", (const char*)text.mb_str() );
printf( "%s\n", (const char*) text.mb_str() );
#endif
}
/*************************************************************************/
void WinEDA_BasicFrame::DisplayActivity(int PerCent, const wxString & Text)
void WinEDA_BasicFrame::DisplayActivity( int PerCent, const wxString& Text )
/*************************************************************************/
/* Display a bargraph (0 to 50 point length) for a PerCent value from 0 to 100
*/
*/
{
wxString Line;
wxString Line;
Line = Text;
PerCent = (PerCent < 0) ? 0 : PerCent;
PerCent = (PerCent > 100) ? 100 : PerCent;
PerCent /= 2; // Bargraph is 0 .. 50 points from 0% to 100%
if (PerCent) Line.Pad(PerCent, '*');
if( PerCent )
Line.Pad( PerCent, '*' );
SetStatusText(Line);
SetStatusText( Line );
}
/*******************************************************************/
void WinEDA_BasicFrame::SetLastProject(const wxString & FullFileName)
/*******************************************************************/
/* Met a jour la liste des anciens projets
*/
{
unsigned ii;
if ( FullFileName.IsEmpty() ) return;
/*******************************************************************/
void WinEDA_BasicFrame::SetLastProject( const wxString& FullFileName )
/*******************************************************************/
/* Met a jour la liste des anciens projets
*/
{
unsigned ii;
if( FullFileName.IsEmpty() )
return;
//suppression d'une ancienne trace eventuelle du meme fichier
for ( ii = 0; ii < m_Parent->m_LastProject.GetCount(); )
for( ii = 0; ii < m_Parent->m_LastProject.GetCount(); )
{
if(m_Parent->m_LastProject[ii].IsEmpty() ) break;
if( m_Parent->m_LastProject[ii].IsEmpty() )
break;
#ifdef __WINDOWS__
if ( m_Parent->m_LastProject[ii].CmpNoCase(FullFileName) == 0 )
if( m_Parent->m_LastProject[ii].CmpNoCase( FullFileName ) == 0 )
#else
if ( m_Parent->m_LastProject[ii] == FullFileName )
if( m_Parent->m_LastProject[ii] == FullFileName )
#endif
{
#if ( (wxMAJOR_VERSION < 2) || ((wxMAJOR_VERSION == 2)&& (wxMINOR_VERSION <= 4)) )
m_Parent->m_LastProject.Remove(ii);
#if ( ( wxMAJOR_VERSION < 2) || ( ( wxMAJOR_VERSION == 2)&& (wxMINOR_VERSION <= 4 ) ) )
m_Parent->m_LastProject.Remove( ii );
#else
m_Parent->m_LastProject.RemoveAt(ii);
m_Parent->m_LastProject.RemoveAt( ii );
#endif
}
else ii++;
else
ii++;
}
while (m_Parent->m_LastProject.GetCount() >= m_Parent->m_LastProjectMaxCount)
while( m_Parent->m_LastProject.GetCount() >= m_Parent->m_LastProjectMaxCount )
{
#if ( (wxMAJOR_VERSION < 2) || ((wxMAJOR_VERSION == 2)&& (wxMINOR_VERSION <= 4)) )
files.Remove(files.GetCount() - 1);
#if ( ( wxMAJOR_VERSION < 2) || ( ( wxMAJOR_VERSION == 2)&& (wxMINOR_VERSION <= 4 ) ) )
files.Remove( files.GetCount() - 1 );
#else
m_Parent->m_LastProject.RemoveAt(m_Parent->m_LastProject.GetCount() - 1);
m_Parent->m_LastProject.RemoveAt( m_Parent->m_LastProject.GetCount() - 1 );
#endif
}
m_Parent->m_LastProject.Insert(FullFileName, 0);
m_Parent->m_LastProject.Insert( FullFileName, 0 );
ReCreateMenuBar();
}
/**************************************************/
wxString WinEDA_BasicFrame::GetLastProject(int rang)
wxString WinEDA_BasicFrame::GetLastProject( int rang )
/**************************************************/
{
if ( rang < 0 ) rang = 0;
if ( (unsigned) rang >= m_Parent->m_LastProject.GetCount() )
if( rang < 0 )
rang = 0;
if( (unsigned) rang >= m_Parent->m_LastProject.GetCount() )
return wxEmptyString;
return m_Parent->m_LastProject[rang];
}
/**************************************************************/
void WinEDA_BasicFrame::GetKicadHelp(wxCommandEvent& event)
void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
/**************************************************************/
{
if ( m_Parent->m_HtmlCtrl == NULL )
if( m_Parent->m_HtmlCtrl == NULL )
{
m_Parent->InitOnLineHelp();
}
if ( m_Parent->m_HtmlCtrl )
if( m_Parent->m_HtmlCtrl )
{
m_Parent->m_HtmlCtrl->DisplayContents();
m_Parent->m_HtmlCtrl->Display(m_Parent->m_HelpFileName);
m_Parent->m_HtmlCtrl->Display( m_Parent->m_HelpFileName );
}
else
{
wxString msg;
msg.Printf( _("Help file %s not found"), m_Parent->m_HelpFileName.GetData() );
DisplayError(this, msg);
msg.Printf( _( "Help file %s not found" ), m_Parent->m_HelpFileName.GetData() );
DisplayError( this, msg );
}
}
/***********************************************************/
void WinEDA_BasicFrame::GetKicadAbout(wxCommandEvent& event)
void WinEDA_BasicFrame::GetKicadAbout( wxCommandEvent& event )
/**********************************************************/
{
Print_Kicad_Infos(this, m_AboutTitle);
Print_Kicad_Infos( this, m_AboutTitle );
}
/********************************************************************/
void WinEDA_BasicFrame::ProcessFontPreferences(int id)
void WinEDA_BasicFrame::ProcessFontPreferences( int id )
/********************************************************************/
{
wxFont font;
wxFont font;
switch (id)
switch( id )
{
case ID_PREFERENCES_FONT:
break;
case ID_PREFERENCES_FONT_STATUS:
{
font = wxGetFontFromUser(this, *g_StdFont);
if ( font.Ok() )
font = wxGetFontFromUser( this, *g_StdFont );
if( font.Ok() )
{
int pointsize = font.GetPointSize();
*g_StdFont = font;
SetFont(*g_StdFont);
if ( GetStatusBar() )
GetStatusBar()->SetFont(*g_StdFont);
SetFont( *g_StdFont );
if( GetStatusBar() )
GetStatusBar()->SetFont( *g_StdFont );
g_StdFontPointSize = pointsize;
}
break;
}
case ID_PREFERENCES_FONT_DIALOG:
{
font = wxGetFontFromUser(this, *g_DialogFont);
if ( font.Ok() )
font = wxGetFontFromUser( this, *g_DialogFont );
if( font.Ok() )
{
int pointsize = font.GetPointSize();
*g_DialogFont = font;
SetFont(*g_DialogFont);
SetFont( *g_DialogFont );
g_DialogFontPointSize = pointsize;
g_FixedFontPointSize = pointsize;
g_FixedFont->SetPointSize(g_FixedFontPointSize);
g_FixedFont->SetPointSize( g_FixedFontPointSize );
}
break;
}
default: DisplayError(this, wxT("WinEDA_BasicFrame::ProcessFontPreferences Internal Error") );
default:
DisplayError( this, wxT( "WinEDA_BasicFrame::ProcessFontPreferences Internal Error" ) );
break;
}
}

View File

@ -1,6 +1,6 @@
/**************************************************/
/* WORKSHEET.CPP : routines de trace du cartouche */
/**************************************************/
/**************************************************/
/* WORKSHEET.CPP : routines de trace du cartouche */
/**************************************************/
#include "fctsys.h"
#include "gr_basic.h"
@ -14,58 +14,62 @@
extern wxString g_Main_Title;
/*************************************************************************************/
void WinEDA_DrawFrame::TraceWorkSheet(wxDC * DC, BASE_SCREEN * screen, int line_width)
void WinEDA_DrawFrame::TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width )
/*************************************************************************************/
/* Draw the sheet references
*/
{
if ( ! m_Draw_Sheet_Ref ) return;
Ki_PageDescr * Sheet = screen->m_CurrentSheetDesc;
int ii, jj, xg , yg, ipas, gxpas, gypas;
wxPoint pos;
int refx, refy,Color;
wxString Line;
Ki_WorkSheetData * WsItem;
int scale = m_InternalUnits/1000;
wxSize size(SIZETEXT*scale,SIZETEXT*scale);
wxSize size_ref(SIZETEXT_REF*scale,SIZETEXT_REF*scale);
wxString msg;
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
int width = line_width;
/* Draw the sheet references
*/
{
if( !m_Draw_Sheet_Ref )
return;
Ki_PageDescr* Sheet = screen->m_CurrentSheetDesc;
int ii, jj, xg, yg, ipas, gxpas, gypas;
wxPoint pos;
int refx, refy, Color;
wxString Line;
Ki_WorkSheetData* WsItem;
int scale = m_InternalUnits / 1000;
wxSize size( SIZETEXT* scale, SIZETEXT* scale );
wxSize size_ref( SIZETEXT_REF* scale, SIZETEXT_REF* scale );
wxString msg;
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
int width = line_width;
Color = RED;
if(Sheet == NULL)
if( Sheet == NULL )
{
DisplayError(this,
wxT("WinEDA_DrawFrame::TraceWorkSheet() error: m_CurrentSheet NULL"));
DisplayError( this,
wxT( "WinEDA_DrawFrame::TraceWorkSheet() error: m_CurrentSheet NULL" ) );
return;
}
// if not printing, draw the page limits:
if ( ! g_IsPrinting & g_ShowPageLimits )
if( !g_IsPrinting & g_ShowPageLimits )
{
GRSetDrawMode(DC, GR_COPY);
GRRect(&DrawPanel->m_ClipBox, DC, 0, 0,
GRSetDrawMode( DC, GR_COPY );
GRRect( &DrawPanel->m_ClipBox, DC, 0, 0,
Sheet->m_Size.x * scale, Sheet->m_Size.y * scale, width,
g_DrawBgColor == WHITE ? LIGHTGRAY : DARKDARKGRAY );
}
GRSetDrawMode(DC, GR_COPY);
GRSetDrawMode( DC, GR_COPY );
/* trace de la bordure */
refx = Sheet->m_LeftMargin;
refy = Sheet->m_TopMargin; /* Upper left corner */
xg = Sheet->m_Size.x - Sheet->m_RightMargin;
yg = Sheet->m_Size.y - Sheet->m_BottomMargin; /* lower right corner */
for ( ii = 0; ii < 2 ; ii++ )
for( ii = 0; ii < 2; ii++ )
{
GRRect(&DrawPanel->m_ClipBox, DC, refx * scale, refy * scale,
xg * scale, yg * scale, width, Color);
GRRect( &DrawPanel->m_ClipBox, DC, refx * scale, refy * scale,
xg * scale, yg * scale, width, Color );
refx += GRID_REF_W; refy += GRID_REF_W;
xg -= GRID_REF_W; yg -= GRID_REF_W;
}
/* trace des reperes */
refx = Sheet->m_LeftMargin;
refy = Sheet->m_TopMargin; /* Upper left corner */
@ -75,230 +79,249 @@ int width = line_width;
/* Trace des reperes selon l'axe X */
ipas = (xg - refx) / PAS_REF;
gxpas = ( xg - refx) / ipas;
for ( ii = refx + gxpas, jj = 1; ipas > 0 ; ii += gxpas , jj++, ipas--)
for( ii = refx + gxpas, jj = 1; ipas > 0; ii += gxpas, jj++, ipas-- )
{
Line.Printf( wxT("%d"),jj);
if( ii < xg - PAS_REF/2 )
Line.Printf( wxT( "%d" ), jj );
if( ii < xg - PAS_REF / 2 )
{
GRLine(&DrawPanel->m_ClipBox, DC, ii * scale, refy * scale,
ii * scale, (refy + GRID_REF_W) * scale, width, Color);
GRLine( &DrawPanel->m_ClipBox, DC, ii * scale, refy * scale,
ii * scale, (refy + GRID_REF_W) * scale, width, Color );
}
DrawGraphicText(DrawPanel, DC,
wxPoint( (ii - gxpas/2) * scale, (refy + GRID_REF_W/2) * scale),
DrawGraphicText( DrawPanel, DC,
wxPoint( (ii - gxpas / 2) * scale, (refy + GRID_REF_W / 2) * scale ),
Color,
Line, TEXT_ORIENT_HORIZ, size_ref,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width);
if( ii < xg - PAS_REF/2 )
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width );
if( ii < xg - PAS_REF / 2 )
{
GRLine(&DrawPanel->m_ClipBox, DC,ii * scale, yg * scale,
ii * scale, (yg - GRID_REF_W) * scale, width, Color);
GRLine( &DrawPanel->m_ClipBox, DC, ii * scale, yg * scale,
ii * scale, (yg - GRID_REF_W) * scale, width, Color );
}
DrawGraphicText(DrawPanel, DC,
wxPoint( (ii - gxpas/2) * scale, (yg - GRID_REF_W/2) * scale),
DrawGraphicText( DrawPanel, DC,
wxPoint( (ii - gxpas / 2) * scale, (yg - GRID_REF_W / 2) * scale ),
Color,
Line, TEXT_ORIENT_HORIZ, size_ref,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width );
}
/* Trace des reperes selon l'axe Y */
ipas = (yg - refy) / PAS_REF;
gypas = ( yg - refy) / ipas;
for ( ii = refy + gypas, jj = 0; ipas > 0 ; ii += gypas , jj++, ipas--)
for( ii = refy + gypas, jj = 0; ipas > 0; ii += gypas, jj++, ipas-- )
{
Line.Empty();
if( jj < 26 ) Line.Printf(wxT("%c"), jj + 'A');
else Line.Printf(wxT("%c"), 'a' + jj - 26);
if( ii < yg - PAS_REF/2 )
if( jj < 26 )
Line.Printf( wxT( "%c" ), jj + 'A' );
else
Line.Printf( wxT( "%c" ), 'a' + jj - 26 );
if( ii < yg - PAS_REF / 2 )
{
GRLine(&DrawPanel->m_ClipBox, DC, refx * scale, ii * scale,
(refx + GRID_REF_W) * scale, ii * scale, width, Color);
GRLine( &DrawPanel->m_ClipBox, DC, refx * scale, ii * scale,
(refx + GRID_REF_W) * scale, ii * scale, width, Color );
}
DrawGraphicText(DrawPanel, DC,
wxPoint((refx + GRID_REF_W/2) * scale, (ii - gypas/2) * scale),
DrawGraphicText( DrawPanel, DC,
wxPoint( (refx + GRID_REF_W / 2) * scale, (ii - gypas / 2) * scale ),
Color,
Line, TEXT_ORIENT_HORIZ, size_ref,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width);
if( ii < yg - PAS_REF/2 )
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width );
if( ii < yg - PAS_REF / 2 )
{
GRLine(&DrawPanel->m_ClipBox, DC, xg * scale, ii * scale,
(xg - GRID_REF_W) * scale, ii * scale, width, Color);
GRLine( &DrawPanel->m_ClipBox, DC, xg * scale, ii * scale,
(xg - GRID_REF_W) * scale, ii * scale, width, Color );
}
DrawGraphicText(DrawPanel, DC,
wxPoint((xg - GRID_REF_W/2) * scale, (ii - gxpas/2) * scale),
DrawGraphicText( DrawPanel, DC,
wxPoint( (xg - GRID_REF_W / 2) * scale, (ii - gxpas / 2) * scale ),
Color,
Line, TEXT_ORIENT_HORIZ, size_ref,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, width );
}
/* Trace du cartouche */
refx = Sheet->m_Size.x - Sheet->m_RightMargin - GRID_REF_W;
refy = Sheet->m_Size.y - Sheet->m_BottomMargin - GRID_REF_W; /* lower right corner */
for( WsItem = &WS_Date; WsItem != NULL; WsItem = WsItem->Pnext )
{
pos.x = (refx - WsItem->m_Posx)* scale;
pos.y = (refy - WsItem->m_Posy)* scale;
pos.x = (refx - WsItem->m_Posx) * scale;
pos.y = (refy - WsItem->m_Posy) * scale;
msg.Empty();
switch( WsItem->m_Type )
{
case WS_DATE:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Date;
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
break;
case WS_REV:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Revision;
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
break;
case WS_KICAD_VERSION:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += g_ProductName + g_Main_Title;
msg += wxT(" ") + GetBuildVersion();
DrawGraphicText(DrawPanel, DC, pos, Color,
msg += wxT( " " ) + GetBuildVersion();
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
break;
case WS_SIZESHEET:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += Sheet->m_Name;
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
break;
case WS_IDENTSHEET:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
msg << screen->m_ScreenNumber << wxT("/") << screen->m_NumberOfScreen;
DrawGraphicText(DrawPanel, DC, pos, Color,
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << screen->m_ScreenNumber << wxT( "/" ) << screen->m_NumberOfScreen;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
break;
case WS_FILENAME:
{
wxString fname, fext;
wxFileName::SplitPath(screen->m_FileName, (wxString*)NULL, &fname, &fext);
if(WsItem->m_Legende) msg = WsItem->m_Legende;
msg << fname << wxT(".") << fext;
DrawGraphicText(DrawPanel, DC, pos, Color,
wxFileName::SplitPath( screen->m_FileName, (wxString*) NULL, &fname, &fext );
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg << fname << wxT( "." ) << fext;
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
}
break;
case WS_FULLSHEETNAME:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += GetScreenDesc();
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
break;
case WS_COMPANY_NAME:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Company;
if ( ! msg.IsEmpty() )
if( !msg.IsEmpty() )
{
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
UpperLimit = MAX(UpperLimit, WsItem->m_Posy+SIZETEXT);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
case WS_TITLE:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Title;
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
break;
case WS_COMMENT1:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Commentaire1;
if ( ! msg.IsEmpty() )
if( !msg.IsEmpty() )
{
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
UpperLimit = MAX(UpperLimit, WsItem->m_Posy+SIZETEXT);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
case WS_COMMENT2:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Commentaire2;
if ( ! msg.IsEmpty() )
if( !msg.IsEmpty() )
{
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
UpperLimit = MAX(UpperLimit, WsItem->m_Posy+SIZETEXT);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
case WS_COMMENT3:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Commentaire3;
if ( ! msg.IsEmpty() )
if( !msg.IsEmpty() )
{
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
UpperLimit = MAX(UpperLimit, WsItem->m_Posy+SIZETEXT);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
case WS_COMMENT4:
if(WsItem->m_Legende) msg = WsItem->m_Legende;
if( WsItem->m_Legende )
msg = WsItem->m_Legende;
msg += screen->m_Commentaire4;
if ( ! msg.IsEmpty() )
if( !msg.IsEmpty() )
{
DrawGraphicText(DrawPanel, DC, pos, Color,
DrawGraphicText( DrawPanel, DC, pos, Color,
msg, TEXT_ORIENT_HORIZ, size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width);
UpperLimit = MAX(UpperLimit, WsItem->m_Posy+SIZETEXT);
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, width );
UpperLimit = MAX( UpperLimit, WsItem->m_Posy + SIZETEXT );
}
break;
case WS_UPPER_SEGMENT:
if (UpperLimit == 0 ) break;
if( UpperLimit == 0 )
break;
case WS_LEFT_SEGMENT:
WS_MostUpperLine.m_Posy =
WS_MostUpperLine.m_Endy =
WS_MostLeftLine.m_Posy = UpperLimit;
pos.y = (refy - WsItem->m_Posy)* scale;
pos.y = (refy - WsItem->m_Posy) * scale;
case WS_SEGMENT:
xg = Sheet->m_Size.x -
GRID_REF_W - Sheet->m_RightMargin - WsItem->m_Endx;
yg = Sheet->m_Size.y -
GRID_REF_W - Sheet->m_BottomMargin - WsItem->m_Endy;
GRLine(&DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color);
GRLine( &DrawPanel->m_ClipBox, DC, pos.x, pos.y,
xg * scale, yg * scale, width, Color );
break;
}
}
}
/*********************************************************************/
wxString WinEDA_DrawFrame::GetScreenDesc()
/*********************************************************************/
{
wxString msg;
msg << GetScreen()->m_ScreenNumber << wxT("/") <<
msg << GetScreen()->m_ScreenNumber << wxT( "/" ) <<
GetScreen()->m_NumberOfScreen;
return msg;
}

View File

@ -1,6 +1,6 @@
/*************************/
/* Edition des Pastilles */
/*************************/
/*************************/
/* Edition des Pastilles */
/*************************/
#include "fctsys.h"
#include "gr_basic.h"
@ -22,66 +22,68 @@ static bool Pad_Shape_Change = FALSE;
static bool Pad_Orient_Change = FALSE;
static bool Pad_Drill_Change = TRUE;
enum id_pad_global_edit
{
enum id_pad_global_edit {
ID_CHANGE_CURRENT_MODULE = 1900,
ID_CHANGE_ID_MODULES,
ID_CHANGE_GET_PAD_SETTINGS
};
/************************************/
/* class WinEDA_PadGlobalEditFrame */
/************************************/
/************************************/
/* class WinEDA_PadGlobalEditFrame */
/************************************/
class WinEDA_PadGlobalEditFrame: public wxDialog
class WinEDA_PadGlobalEditFrame : public wxDialog
{
private:
WinEDA_BasePcbFrame * m_Parent;
wxDC * m_DC;
D_PAD * CurrentPad;
wxCheckBox * m_Pad_Shape_Filter;
wxCheckBox * m_Pad_Layer_Filter;
wxCheckBox * m_Pad_Orient_Filter;
wxCheckBox * m_Pad_Size_Change;
wxCheckBox * m_Pad_Shape_Change;
wxCheckBox * m_Pad_Drill_Change;
wxCheckBox * m_Pad_Orient_Change;
WinEDA_BasePcbFrame* m_Parent;
wxDC* m_DC;
D_PAD* CurrentPad;
wxCheckBox* m_Pad_Shape_Filter;
wxCheckBox* m_Pad_Layer_Filter;
wxCheckBox* m_Pad_Orient_Filter;
wxCheckBox* m_Pad_Size_Change;
wxCheckBox* m_Pad_Shape_Change;
wxCheckBox* m_Pad_Drill_Change;
wxCheckBox* m_Pad_Orient_Change;
public:
// Constructor and destructor
WinEDA_PadGlobalEditFrame(WinEDA_BasePcbFrame *parent,
D_PAD * Pad, wxDC * DC, const wxPoint & pos);
WinEDA_PadGlobalEditFrame( WinEDA_BasePcbFrame * parent,
D_PAD * Pad, wxDC * DC, const wxPoint &pos );
~WinEDA_PadGlobalEditFrame() { }
private:
void PadPropertiesAccept(wxCommandEvent& event);
void OnCancelClick(wxCommandEvent& event);
void PadPropertiesAccept( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE(WinEDA_PadGlobalEditFrame, wxDialog)
EVT_BUTTON(ID_CHANGE_CURRENT_MODULE, WinEDA_PadGlobalEditFrame::PadPropertiesAccept)
EVT_BUTTON(ID_CHANGE_ID_MODULES, WinEDA_PadGlobalEditFrame::PadPropertiesAccept)
EVT_BUTTON(ID_CHANGE_GET_PAD_SETTINGS, WinEDA_PadGlobalEditFrame::PadPropertiesAccept)
EVT_BUTTON(wxID_CANCEL, WinEDA_PadGlobalEditFrame::OnCancelClick)
BEGIN_EVENT_TABLE( WinEDA_PadGlobalEditFrame, wxDialog )
EVT_BUTTON( ID_CHANGE_CURRENT_MODULE, WinEDA_PadGlobalEditFrame::PadPropertiesAccept )
EVT_BUTTON( ID_CHANGE_ID_MODULES, WinEDA_PadGlobalEditFrame::PadPropertiesAccept )
EVT_BUTTON( ID_CHANGE_GET_PAD_SETTINGS, WinEDA_PadGlobalEditFrame::PadPropertiesAccept )
EVT_BUTTON( wxID_CANCEL, WinEDA_PadGlobalEditFrame::OnCancelClick )
END_EVENT_TABLE()
/********************************************************************************/
WinEDA_PadGlobalEditFrame::WinEDA_PadGlobalEditFrame(WinEDA_BasePcbFrame *parent,
D_PAD * Pad,wxDC * DC, const wxPoint & framepos):
wxDialog(parent, -1, _("Pads Global Edit"), framepos, wxSize(310, 235),
DIALOG_STYLE)
WinEDA_PadGlobalEditFrame::WinEDA_PadGlobalEditFrame( WinEDA_BasePcbFrame* parent,
D_PAD* Pad,
wxDC* DC,
const wxPoint& framepos ) :
wxDialog( parent, -1, _( "Pads Global Edit" ), framepos, wxSize( 310, 235 ),
DIALOG_STYLE )
/********************************************************************************/
{
wxPoint pos;
wxButton * Button;
wxPoint pos;
wxButton* Button;
m_Parent = parent;
SetFont(*g_DialogFont);
SetFont( *g_DialogFont );
m_DC = DC;
Centre();
@ -90,68 +92,79 @@ wxButton * Button;
/* Creation des boutons de commande */
pos.x = 150;
pos.y = 10;
Button = new wxButton(this, ID_CHANGE_GET_PAD_SETTINGS,
_("Pad Settings..."), pos);
Button->SetForegroundColour( wxColor(0, 80, 0) );
Button = new wxButton( this, ID_CHANGE_GET_PAD_SETTINGS,
_( "Pad Settings..." ), pos );
Button->SetForegroundColour( wxColor( 0, 80, 0 ) );
pos.y += Button->GetDefaultSize().y + 50;
Button = new wxButton(this, ID_CHANGE_CURRENT_MODULE,
_("Change Module"), pos);
Button = new wxButton( this, ID_CHANGE_CURRENT_MODULE,
_( "Change Module" ), pos );
Button->SetForegroundColour( *wxRED );
pos.y += Button->GetDefaultSize().y + 10;
Button = new wxButton(this, ID_CHANGE_ID_MODULES,
_("Change Id Modules"), pos);
Button = new wxButton( this, ID_CHANGE_ID_MODULES,
_( "Change Id Modules" ), pos );
Button->SetForegroundColour( *wxRED );
pos.y += Button->GetDefaultSize().y + 10;
Button = new wxButton(this, wxID_CANCEL, _("Cancel"), pos);
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ), pos );
Button->SetForegroundColour( *wxBLUE );
// Selection des filtres de selection des pads :
pos.x = 5;
pos.y = 5;
new wxStaticBox(this, -1, _("Pad Filter :"), pos, wxSize(130, 75) );
new wxStaticBox( this, -1, _( "Pad Filter :" ), pos, wxSize( 130, 75 ) );
pos.x += 5;
pos.y += 18;
m_Pad_Shape_Filter = new wxCheckBox(this, -1, _("Shape Filter"), pos);
m_Pad_Shape_Filter->SetValue(Pad_Shape_Filter);
m_Pad_Shape_Filter = new wxCheckBox( this, -1, _( "Shape Filter" ), pos );
m_Pad_Shape_Filter->SetValue( Pad_Shape_Filter );
pos.y += 18;
m_Pad_Layer_Filter = new wxCheckBox(this, -1, _("Layer Filter"), pos);
m_Pad_Layer_Filter->SetValue(Pad_Layer_Filter);
m_Pad_Layer_Filter = new wxCheckBox( this, -1, _( "Layer Filter" ), pos );
m_Pad_Layer_Filter->SetValue( Pad_Layer_Filter );
pos.y += 18;
m_Pad_Orient_Filter = new wxCheckBox(this, -1, _("Orient Filter"), pos);
m_Pad_Orient_Filter->SetValue(Pad_Orient_Filter);
m_Pad_Orient_Filter = new wxCheckBox( this, -1, _( "Orient Filter" ), pos );
m_Pad_Orient_Filter->SetValue( Pad_Orient_Filter );
// Items a editer
pos.x -= 5;
pos.y += 25;
new wxStaticBox(this, -1, _("Change Items :"), pos, wxSize(130, 95) );
new wxStaticBox( this, -1, _( "Change Items :" ), pos, wxSize( 130, 95 ) );
pos.x += 5;
pos.y += 18;
m_Pad_Size_Change = new wxCheckBox(this, -1, _("Change Size"), pos);
m_Pad_Size_Change->SetValue(Pad_Size_Change);
m_Pad_Size_Change = new wxCheckBox( this, -1, _( "Change Size" ), pos );
m_Pad_Size_Change->SetValue( Pad_Size_Change );
pos.y += 18;
m_Pad_Shape_Change = new wxCheckBox(this, -1, _("Change Shape"), pos);
m_Pad_Shape_Change->SetValue(Pad_Shape_Change);
m_Pad_Shape_Change = new wxCheckBox( this, -1, _( "Change Shape" ), pos );
m_Pad_Shape_Change->SetValue( Pad_Shape_Change );
pos.y += 18;
m_Pad_Drill_Change = new wxCheckBox(this, -1, _("Change Drill"), pos);
m_Pad_Drill_Change->SetValue(Pad_Drill_Change);
m_Pad_Drill_Change = new wxCheckBox( this, -1, _( "Change Drill" ), pos );
m_Pad_Drill_Change->SetValue( Pad_Drill_Change );
pos.y += 18;
m_Pad_Orient_Change = new wxCheckBox(this, -1, _("Change Orient"), pos);
m_Pad_Orient_Change->SetValue(Pad_Orient_Change);
m_Pad_Orient_Change = new wxCheckBox( this, -1, _( "Change Orient" ), pos );
m_Pad_Orient_Change->SetValue( Pad_Orient_Change );
}
/**********************************************************************/
void WinEDA_PadGlobalEditFrame::OnCancelClick(wxCommandEvent& WXUNUSED(event))
void WinEDA_PadGlobalEditFrame::OnCancelClick( wxCommandEvent& WXUNUSED (event) )
/**********************************************************************/
{
EndModal( -1 );
@ -159,21 +172,23 @@ void WinEDA_PadGlobalEditFrame::OnCancelClick(wxCommandEvent& WXUNUSED(event))
/*************************************************************************/
void WinEDA_PadGlobalEditFrame::PadPropertiesAccept(wxCommandEvent& event)
void WinEDA_PadGlobalEditFrame::PadPropertiesAccept( wxCommandEvent& event )
/*************************************************************************/
/* Met a jour les differents parametres pour le composant en cours d'édition
*/
{
int returncode = 0;
int returncode = 0;
switch( event.GetId() )
{
case ID_CHANGE_GET_PAD_SETTINGS:
m_Parent->InstallPadOptionsFrame( NULL, NULL, wxPoint(-1, -1) );
m_Parent->InstallPadOptionsFrame( NULL, NULL, wxPoint( -1, -1 ) );
break;
case ID_CHANGE_ID_MODULES:
returncode = 1;
// Fall through
case ID_CHANGE_CURRENT_MODULE:
@ -191,8 +206,9 @@ int returncode = 0;
/***************************************************************************/
void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD * Pad, wxDC * DC)
void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD* Pad, wxDC* DC )
/***************************************************************************/
/*
* Routine de selection et de correction des dimensions des pastilles
* de tous les modules
@ -201,28 +217,29 @@ void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD * Pad, wxDC * DC)
* - ou sur l'module localisee, selon le menu d'appel
*/
{
D_PAD* pt_pad ;
MODULE * Module_Ref , * Module;
int diag;
bool Edit_Same_Modules = FALSE;
D_PAD* pt_pad;
MODULE* Module_Ref, * Module;
int diag;
bool Edit_Same_Modules = FALSE;
if( Pad == NULL )
return;
Module = (MODULE *) Pad->m_Parent;
Module = (MODULE*) Pad->m_Parent;
if( Module == NULL )
{
DisplayError(this, wxT("Global_Import_Pad_Settings() Error: NULL module"));
DisplayError( this, wxT( "Global_Import_Pad_Settings() Error: NULL module" ) );
return;
}
wxString ref_name_module = Module->m_LibRef;
wxString ref_name_module = Module->m_LibRef;
Module->Display_Infos(this);
Module->Display_Infos( this );
WinEDA_PadGlobalEditFrame* frame = new WinEDA_PadGlobalEditFrame( this, Pad, DC,
wxPoint( -1, -1 ) );
WinEDA_PadGlobalEditFrame * frame = new WinEDA_PadGlobalEditFrame(this, Pad,DC,
wxPoint(-1,-1));
diag = frame->ShowModal();
frame->Destroy();
@ -239,17 +256,17 @@ WinEDA_PadGlobalEditFrame * frame = new WinEDA_PadGlobalEditFrame(this, Pad,DC,
Module = (MODULE*) m_Pcb->m_Modules;
for( ; Module != NULL; Module = (MODULE*) Module->Pnext )
{
if( ! Edit_Same_Modules )
if( !Edit_Same_Modules )
if( Module != Module_Ref )
continue;
if( ref_name_module != Module->m_LibRef )
continue ;
continue;
Module->Display_Infos(this);
Module->Display_Infos( this );
/* Effacement du module */
Module->Draw(DrawPanel, DC, wxPoint(0, 0), GR_XOR);
Module->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_XOR );
pt_pad = (D_PAD*) Module->m_Pads;
for( ; pt_pad != NULL; pt_pad = (D_PAD*) pt_pad->Pnext )
@ -315,7 +332,7 @@ WinEDA_PadGlobalEditFrame * frame = new WinEDA_PadGlobalEditFrame(this, Pad,DC,
{
case PAD_SMD:
case PAD_CONN:
pt_pad->m_Drill = wxSize(0, 0);
pt_pad->m_Drill = wxSize( 0, 0 );
pt_pad->m_Offset.x = 0;
pt_pad->m_Offset.y = 0;
break;
@ -323,10 +340,13 @@ WinEDA_PadGlobalEditFrame * frame = new WinEDA_PadGlobalEditFrame(this, Pad,DC,
default:
break;
}
pt_pad->ComputeRayon();
}
Module->Set_Rectangle_Encadrement();
Module->Draw(DrawPanel, DC, wxPoint(0, 0), GR_OR);
Module->Draw( DrawPanel, DC, wxPoint( 0, 0 ), GR_OR );
}
GetScreen()->SetModify();
}

View File

@ -309,7 +309,7 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
if( strncmp( Line, "Layer[", LAYERKEYZ ) == 0 )
{
// parse:
// Layer[n] "a Layer name" <LAYER_T>
// Layer[n] <a_Layer_name_with_no_spaces> <LAYER_T>
char* cp = Line + LAYERKEYZ;
int layer = atoi(cp);
@ -320,7 +320,6 @@ int WinEDA_BasePcbFrame::ReadSetup( FILE* File, int* LineNum )
m_Pcb->SetLayerName( layer, layerName );
data = strtok( NULL, " " );
if( data )
{
LAYER_T type = LAYER::ParseType( data );