all: new Russian GOST patch - author Konstantin Baranovskiy
pcbnew: fix print format in THROW_IO_ERROR fix properties file export_vrml.cpp
This commit is contained in:
parent
e90fc3a9b2
commit
5a5b90984a
|
@ -59,17 +59,12 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
|||
int iusPerMil = plotter->GetIUsPerDecimil() * 10;
|
||||
wxSize pageSize = aPageInfo.GetSizeMils(); // in mils
|
||||
int xg, yg;
|
||||
wxPoint pos, ref;
|
||||
int refx, refy;
|
||||
wxPoint pos, end, ref;
|
||||
wxString msg;
|
||||
wxSize text_size;
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
wxSize text_size2;
|
||||
wxSize text_size3;
|
||||
wxSize text_size1_5;
|
||||
#else
|
||||
int UpperLimit = VARIABLE_BLOCK_START_POSITION;
|
||||
#endif
|
||||
|
||||
EDA_COLOR_T plotClr;
|
||||
plotClr = plotter->GetColorMode() ? RED : BLACK;
|
||||
|
@ -84,6 +79,19 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
|||
yg = ( pageSize.y - aPageInfo.GetBottomMarginMils() ) * iusPerMil;
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
|
||||
int lnMsg, ln;
|
||||
text_size.x = SIZETEXT * iusPerMil;
|
||||
text_size.y = SIZETEXT * iusPerMil;
|
||||
wxSize sz;
|
||||
wxSize text_size0_8( SIZETEXT * iusPerMil * 0.8, SIZETEXT * iusPerMil * 1 );
|
||||
wxSize text_size1_5( SIZETEXT * iusPerMil * 1.5, SIZETEXT * iusPerMil * 1.5 );
|
||||
wxSize text_size2( SIZETEXT * iusPerMil * 2, SIZETEXT * iusPerMil * 2 );
|
||||
wxSize text_size3( SIZETEXT * iusPerMil * 3, SIZETEXT * iusPerMil * 3 );
|
||||
int lineOsn_widht = plotter->GetCurrentLineWidth() * 2;
|
||||
int lineTonk_widht = plotter->GetCurrentLineWidth();
|
||||
|
||||
plotter->SetCurrentLineWidth( lineOsn_widht );
|
||||
plotter->MoveTo( ref );
|
||||
pos.x = xg;
|
||||
pos.y = ref.y;
|
||||
|
@ -95,6 +103,7 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
|||
pos.y = yg;
|
||||
plotter->LineTo( pos );
|
||||
plotter->FinishTo( ref );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
|
||||
#else
|
||||
|
||||
|
@ -125,9 +134,6 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
|||
|
||||
#endif
|
||||
|
||||
text_size.x = WSTEXTSIZE * iusPerMil;
|
||||
text_size.y = WSTEXTSIZE * iusPerMil;
|
||||
|
||||
// upper left corner in mils
|
||||
ref.x = aPageInfo.GetLeftMarginMils();
|
||||
ref.y = aPageInfo.GetTopMarginMils();
|
||||
|
@ -137,56 +143,516 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
|||
yg = ( pageSize.y - aPageInfo.GetBottomMarginMils() );
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
for( Ki_WorkSheetData* WsItem = &WS_Segm1_LU;
|
||||
|
||||
// Lower right corner
|
||||
refx = xg;
|
||||
refy = yg;
|
||||
|
||||
// First page
|
||||
if( aSheetNumber == 1 )
|
||||
{
|
||||
for( Ki_WorkSheetData* WsItem = &WS_Osn1_Line1;
|
||||
WsItem != NULL;
|
||||
WsItem = WsItem->Pnext )
|
||||
{
|
||||
pos.x = (refx - WsItem->m_Posx) * iusPerMil;
|
||||
pos.y = (refy - WsItem->m_Posy) * iusPerMil;
|
||||
end.x = (refx - WsItem->m_Endx) * iusPerMil;
|
||||
end.y = (refy - WsItem->m_Endy) * iusPerMil;
|
||||
msg = WsItem->m_Legende;
|
||||
switch( WsItem->m_Type )
|
||||
{
|
||||
case WS_OSN:
|
||||
plotter->SetCurrentLineWidth( lineOsn_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
|
||||
case WS_TONK:
|
||||
plotter->SetCurrentLineWidth( lineTonk_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
|
||||
case WS_TEXT:
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
if( WsItem == &WS_Osn1_Text1 )
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size0_8,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
else
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_TEXTL:
|
||||
if( !msg.IsEmpty() )
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Sheet number
|
||||
if( aNumberOfSheets > 1 )
|
||||
{
|
||||
pos.x = (refx - Mm2mils( 36 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 17.5 )) * iusPerMil;
|
||||
msg.Empty();
|
||||
msg << aSheetNumber;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
|
||||
// Count of sheets
|
||||
pos.x = (refx - Mm2mils( 10 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 17.5 )) * iusPerMil;
|
||||
msg.Empty();
|
||||
msg << aNumberOfSheets;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
|
||||
// Company name
|
||||
msg = aTitleBlock.GetCompany();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size1_5;
|
||||
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
ln = Mm2mils( 49 );
|
||||
if( lnMsg > ln )
|
||||
sz.x *= float( ln ) / lnMsg;
|
||||
pos.x = (refx - Mm2mils( 25 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 7.5 )) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, sz,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
|
||||
// Title
|
||||
msg = aTitleBlock.GetTitle();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size1_5;
|
||||
wxArrayString lines;
|
||||
int titleWidth = 0;
|
||||
int titleHeight = (sz.y + sz.y * 0.5) / iusPerMil;
|
||||
int titleFieldWidth = Mm2mils( 69 );
|
||||
int titleFieldHeight = Mm2mils( 24 );
|
||||
int index = 0;
|
||||
wxString fullMsg = msg;
|
||||
do // Reduce the height of wrapped title until the fit
|
||||
{
|
||||
do // Wrap the title
|
||||
{
|
||||
titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
if( titleWidth > titleFieldWidth )
|
||||
{
|
||||
index = 0;
|
||||
do
|
||||
{
|
||||
msg = msg.Left( msg.Length() - 1 );
|
||||
if( msg.Length() == 0 )
|
||||
{
|
||||
lines.Clear();
|
||||
msg = fullMsg;
|
||||
sz.x -= iusPerMil;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
index++;
|
||||
titleWidth = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
|
||||
wxString ch = wxString( msg.Last() );
|
||||
if( titleWidth < titleFieldWidth && ch == wxT( " " ) )
|
||||
{
|
||||
// New sentence on a new line
|
||||
int dot = msg.Index( wxT( ". " ) );
|
||||
if( dot != wxNOT_FOUND )
|
||||
{
|
||||
index += msg.Length() - dot - 2;
|
||||
msg = msg.Left( dot + 1 );
|
||||
lines.Add( msg );
|
||||
msg = fullMsg.Right( index );
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg = msg.Left( msg.Length() - 1 );
|
||||
lines.Add( msg );
|
||||
msg = fullMsg.Right( index );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}while( 1 );
|
||||
}
|
||||
else
|
||||
{
|
||||
// New sentence on a new line
|
||||
int dot = msg.Index( wxT( ". " ) );
|
||||
if( dot != wxNOT_FOUND )
|
||||
{
|
||||
lines.Add( msg.Left( dot + 1 ) );
|
||||
lines.Add( fullMsg.Right( msg.Length() - dot - 2 ) );
|
||||
}
|
||||
else
|
||||
lines.Add( msg );
|
||||
break;
|
||||
}
|
||||
}while( 1 );
|
||||
|
||||
if( titleFieldHeight < titleHeight * lines.Count() )
|
||||
{
|
||||
sz.y -= iusPerMil;
|
||||
sz.x -= iusPerMil;
|
||||
msg = fullMsg;
|
||||
lines.Clear();
|
||||
}
|
||||
else
|
||||
break;
|
||||
}while( 1 );
|
||||
|
||||
pos.x = (refx - Mm2mils( 85 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 27.5 ) - (titleHeight * (lines.Count() - 1) / 2)) * iusPerMil;
|
||||
|
||||
for( int curLn = 0; curLn < lines.Count(); curLn++ )
|
||||
{
|
||||
msg = lines[curLn];
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, sz,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
pos.y += titleHeight * iusPerMil;
|
||||
}
|
||||
}
|
||||
|
||||
// Decimal number
|
||||
msg = aTitleBlock.GetComment1();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size3;
|
||||
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
ln = Mm2mils( 119 );
|
||||
if( lnMsg > ln )
|
||||
sz.x *= float( ln ) / lnMsg;
|
||||
pos.x = (refx - Mm2mils( 60 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 47.5 )) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, sz,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
|
||||
// Developer
|
||||
msg = aTitleBlock.GetComment2();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size;
|
||||
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
ln = Mm2mils( 22 );
|
||||
if( lnMsg > ln )
|
||||
sz.x *= float( ln ) / lnMsg;
|
||||
pos.x = (refx - Mm2mils( 167.5 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 27.5 )) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, sz,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
|
||||
// Verifier
|
||||
msg = aTitleBlock.GetComment3();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size;
|
||||
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
ln = Mm2mils( 22 );
|
||||
if( lnMsg > ln )
|
||||
sz.x *= float( ln ) / lnMsg;
|
||||
pos.x = (refx - Mm2mils( 167.5 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 22.5 )) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, sz,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
|
||||
// Approver
|
||||
msg = aTitleBlock.GetComment4();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size;
|
||||
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
ln = Mm2mils( 22 );
|
||||
if( lnMsg > ln )
|
||||
sz.x *= float( ln ) / lnMsg;
|
||||
pos.x = (refx - Mm2mils( 167.5 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 2.5 )) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, sz,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
}
|
||||
else // other pages
|
||||
{
|
||||
for( Ki_WorkSheetData* WsItem = &WS_Osn2a_Line1;
|
||||
WsItem != NULL;
|
||||
WsItem = WsItem->Pnext )
|
||||
{
|
||||
pos.x = (refx - WsItem->m_Posx) * iusPerMil;
|
||||
pos.y = (refy - WsItem->m_Posy) * iusPerMil;
|
||||
end.x = (refx - WsItem->m_Endx) * iusPerMil;
|
||||
end.y = (refy - WsItem->m_Endy) * iusPerMil;
|
||||
msg = WsItem->m_Legende;
|
||||
switch( WsItem->m_Type )
|
||||
{
|
||||
case WS_OSN:
|
||||
plotter->SetCurrentLineWidth( lineOsn_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
|
||||
case WS_TONK:
|
||||
plotter->SetCurrentLineWidth( lineTonk_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
|
||||
case WS_TEXT:
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
if( WsItem == &WS_Osn2a_Text1 )
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size0_8,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
else
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_TEXTL:
|
||||
if( !msg.IsEmpty() )
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Sheet number
|
||||
pos.x = (refx - Mm2mils( 5 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 4 )) * iusPerMil;
|
||||
msg.Empty();
|
||||
msg << aSheetNumber;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
|
||||
// Decimal number
|
||||
msg = aTitleBlock.GetComment1();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size3;
|
||||
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
ln = Mm2mils( 109 );
|
||||
if( lnMsg > ln )
|
||||
sz.x *= float( ln ) / lnMsg;
|
||||
pos.x = (refx - Mm2mils( 65 )) * iusPerMil;
|
||||
pos.y = (refy - Mm2mils( 7.5 )) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, sz,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
}
|
||||
|
||||
// Format
|
||||
pos.x = (refx - Mm2mils( 23 )) * iusPerMil;
|
||||
pos.y = (refy + Mm2mils( 2.5 )) * iusPerMil;
|
||||
msg.Empty();
|
||||
msg << aPageInfo.GetType();
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
|
||||
// Lower left corner
|
||||
refx = ref.x;
|
||||
refy = yg;
|
||||
for( Ki_WorkSheetData* WsItem = &WS_DopLeft_Line1;
|
||||
WsItem != NULL;
|
||||
WsItem = WsItem->Pnext )
|
||||
{
|
||||
pos.x = ( ref.x - WsItem->m_Posx ) * iusPerMil;
|
||||
pos.y = ( yg - WsItem->m_Posy ) * iusPerMil;
|
||||
msg.Empty();
|
||||
if( aSheetNumber > 1 && WsItem == &WS_DopLeft_Line9 ) // Some fields for first page only
|
||||
break;
|
||||
|
||||
pos.x = (refx - WsItem->m_Posx) * iusPerMil;
|
||||
pos.y = (refy - WsItem->m_Posy) * iusPerMil;
|
||||
end.x = (refx - WsItem->m_Endx) * iusPerMil;
|
||||
end.y = (refy - WsItem->m_Endy) * iusPerMil;
|
||||
msg = WsItem->m_Legende;
|
||||
switch( WsItem->m_Type )
|
||||
{
|
||||
case WS_CADRE:
|
||||
break;
|
||||
|
||||
case WS_PODPIS_LU:
|
||||
if( WsItem->m_Legende )
|
||||
msg = WsItem->m_Legende;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_VERT, text_size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
|
||||
case WS_SEGMENT_LU:
|
||||
case WS_OSN:
|
||||
plotter->SetCurrentLineWidth( lineOsn_widht );
|
||||
plotter->MoveTo( pos );
|
||||
pos.x = ( ref.x - WsItem->m_Endx ) * iusPerMil;
|
||||
pos.y = ( yg - WsItem->m_Endy ) * iusPerMil;
|
||||
plotter->FinishTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
|
||||
case WS_TONK:
|
||||
plotter->SetCurrentLineWidth( lineTonk_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
|
||||
case WS_TEXT:
|
||||
if( !msg.IsEmpty() )
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_VERT, text_size,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for( Ki_WorkSheetData* WsItem = &WS_Segm1_LT;
|
||||
WsItem != NULL;
|
||||
WsItem = WsItem->Pnext )
|
||||
if( aPageInfo.GetType() == PAGE_INFO::A4 || !aPageInfo.IsPortrait() ) // A4 or Landscape
|
||||
{
|
||||
pos.x = ( ref.x + WsItem->m_Posx ) * iusPerMil;
|
||||
pos.y = ( ref.y + WsItem->m_Posy ) * iusPerMil;
|
||||
msg.Empty();
|
||||
switch( WsItem->m_Type )
|
||||
// Left Top corner
|
||||
refx = ref.x;
|
||||
refy = ref.y;
|
||||
for( Ki_WorkSheetData* WsItem = &WS_DopTop_Line1;
|
||||
WsItem != NULL;
|
||||
WsItem = WsItem->Pnext )
|
||||
{
|
||||
case WS_SEGMENT_LT:
|
||||
plotter->MoveTo( pos );
|
||||
pos.x = ( ref.x + WsItem->m_Endx ) * iusPerMil;
|
||||
pos.y = ( ref.y + WsItem->m_Endy ) * iusPerMil;
|
||||
plotter->FinishTo( pos );
|
||||
break;
|
||||
if( aSheetNumber > 1 && WsItem == &WS_DopTop_Line3 )// Some fields for first page only
|
||||
break;
|
||||
|
||||
pos.x = (refx + WsItem->m_Posx) * iusPerMil;
|
||||
pos.y = (refy + WsItem->m_Posy) * iusPerMil;
|
||||
end.x = (refx + WsItem->m_Endx) * iusPerMil;
|
||||
end.y = (refy + WsItem->m_Endy) * iusPerMil;
|
||||
msg = WsItem->m_Legende;
|
||||
switch( WsItem->m_Type )
|
||||
{
|
||||
case WS_OSN:
|
||||
plotter->SetCurrentLineWidth( lineOsn_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
|
||||
case WS_TONK:
|
||||
plotter->SetCurrentLineWidth( lineTonk_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Decimal number
|
||||
msg = aTitleBlock.GetComment1();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size2;
|
||||
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
ln = Mm2mils( 69 );
|
||||
if( lnMsg > ln )
|
||||
sz.x *= float( ln ) / lnMsg;
|
||||
pos.x = (refx + Mm2mils( 35 )) * iusPerMil;
|
||||
pos.y = (refy + Mm2mils( 7 )) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, 1800, sz,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
}
|
||||
else // Portrait
|
||||
{
|
||||
// Right Top corner
|
||||
// Lines are used from the upper left corner by the change of coordinates
|
||||
refx = xg;
|
||||
refy = ref.y;
|
||||
for( Ki_WorkSheetData* WsItem = &WS_DopTop_Line1;
|
||||
WsItem != NULL;
|
||||
WsItem = WsItem->Pnext )
|
||||
{
|
||||
if( aSheetNumber > 1 && WsItem == &WS_DopTop_Line3 )// Some fields for first page only
|
||||
break;
|
||||
|
||||
pos.x = (refx - WsItem->m_Posy) * iusPerMil;
|
||||
pos.y = (refy + WsItem->m_Posx) * iusPerMil;
|
||||
end.x = (refx - WsItem->m_Endy) * iusPerMil;
|
||||
end.y = (refy + WsItem->m_Endx) * iusPerMil;
|
||||
msg = WsItem->m_Legende;
|
||||
switch( WsItem->m_Type )
|
||||
{
|
||||
case WS_OSN:
|
||||
plotter->SetCurrentLineWidth( lineOsn_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
|
||||
case WS_TONK:
|
||||
plotter->SetCurrentLineWidth( lineTonk_widht );
|
||||
plotter->MoveTo( pos );
|
||||
plotter->FinishTo( end );
|
||||
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Decimal number
|
||||
msg = aTitleBlock.GetComment1();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
sz = text_size2;
|
||||
lnMsg = ReturnGraphicTextWidth( msg, sz.x, false, false ) / iusPerMil;
|
||||
ln = Mm2mils( 69 );
|
||||
if( lnMsg > ln )
|
||||
sz.x *= float( ln ) / lnMsg;
|
||||
pos.x = (refx - Mm2mils( 7 )) * iusPerMil;
|
||||
pos.y = (refy + Mm2mils( 35 )) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_VERT, sz,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
text_size.x = WSTEXTSIZE * iusPerMil;
|
||||
text_size.y = WSTEXTSIZE * iusPerMil;
|
||||
|
||||
// Plot legend along the X axis.
|
||||
int ipas = ( xg - ref.x ) / PAS_REF;
|
||||
int gxpas = ( xg - ref.x ) / ipas;
|
||||
|
@ -271,220 +737,10 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
|||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Plot the worksheet.
|
||||
text_size.x = SIZETEXT * iusPerMil;
|
||||
text_size.y = SIZETEXT * iusPerMil;
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
text_size2.x = SIZETEXT * iusPerMil * 2;
|
||||
text_size2.y = SIZETEXT * iusPerMil * 2;
|
||||
text_size3.x = SIZETEXT * iusPerMil * 3;
|
||||
text_size3.y = SIZETEXT * iusPerMil * 3;
|
||||
text_size1_5.x = SIZETEXT * iusPerMil * 1.5;
|
||||
text_size1_5.y = SIZETEXT * iusPerMil * 1.5;
|
||||
|
||||
ref.x = pageSize.x - aPageInfo.GetRightMarginMils();
|
||||
ref.y = pageSize.y - aPageInfo.GetBottomMarginMils();
|
||||
|
||||
if( aSheetNumber == 1 )
|
||||
{
|
||||
for( Ki_WorkSheetData* WsItem = &WS_Date;
|
||||
WsItem != NULL;
|
||||
WsItem = WsItem->Pnext )
|
||||
{
|
||||
pos.x = ( ref.x - WsItem->m_Posx ) * iusPerMil;
|
||||
pos.y = ( ref.y - WsItem->m_Posy ) * iusPerMil;
|
||||
msg.Empty();
|
||||
|
||||
switch( WsItem->m_Type )
|
||||
{
|
||||
case WS_DATE:
|
||||
break;
|
||||
|
||||
case WS_REV:
|
||||
break;
|
||||
|
||||
case WS_KICAD_VERSION:
|
||||
break;
|
||||
|
||||
case WS_PODPIS:
|
||||
if( WsItem->m_Legende )
|
||||
msg = WsItem->m_Legende;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
|
||||
case WS_SIZESHEET:
|
||||
break;
|
||||
|
||||
case WS_IDENTSHEET:
|
||||
if( WsItem->m_Legende )
|
||||
msg = WsItem->m_Legende;
|
||||
if( aNumberOfSheets > 1 )
|
||||
msg << aSheetNumber;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
|
||||
case WS_SHEETS:
|
||||
if( WsItem->m_Legende )
|
||||
msg = WsItem->m_Legende;
|
||||
msg << aNumberOfSheets;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
|
||||
case WS_COMPANY_NAME:
|
||||
msg = aTitleBlock.GetCompany();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size1_5,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_TITLE:
|
||||
msg = aTitleBlock.GetTitle();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size1_5,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_COMMENT1:
|
||||
msg = aTitleBlock.GetComment1();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size3,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
pos.x = (aPageInfo.GetLeftMarginMils() + 1260) * iusPerMil;
|
||||
pos.y = (aPageInfo.GetTopMarginMils() + 270) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg.GetData(), 1800, text_size2,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_COMMENT2:
|
||||
msg = aTitleBlock.GetComment2();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_COMMENT3:
|
||||
msg = aTitleBlock.GetComment3();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_COMMENT4:
|
||||
msg = aTitleBlock.GetComment4();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_UPPER_SEGMENT:
|
||||
case WS_LEFT_SEGMENT:
|
||||
case WS_SEGMENT:
|
||||
plotter->MoveTo( pos );
|
||||
pos.x = ( ref.x - WsItem->m_Endx ) * iusPerMil;
|
||||
pos.y = ( ref.y - WsItem->m_Endy ) * iusPerMil;
|
||||
plotter->FinishTo( pos );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for( Ki_WorkSheetData* WsItem = &WS_CADRE_D;
|
||||
WsItem != NULL;
|
||||
WsItem = WsItem->Pnext )
|
||||
{
|
||||
pos.x = ( ref.x - WsItem->m_Posx ) * iusPerMil;
|
||||
pos.y = ( ref.y - WsItem->m_Posy ) * iusPerMil;
|
||||
msg.Empty();
|
||||
|
||||
switch( WsItem->m_Type )
|
||||
{
|
||||
case WS_CADRE:
|
||||
// Begin list number > 1
|
||||
msg = aTitleBlock.GetComment1();
|
||||
if( !msg.IsEmpty() )
|
||||
{
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, TEXT_ORIENT_HORIZ, text_size3,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
pos.x = (aPageInfo.GetLeftMarginMils() + 1260) * iusPerMil;
|
||||
pos.y = (aPageInfo.GetTopMarginMils() + 270) * iusPerMil;
|
||||
plotter->Text( pos, plotClr,
|
||||
msg, 1800, text_size2,
|
||||
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
}
|
||||
break;
|
||||
|
||||
case WS_PODPIS_D:
|
||||
if( WsItem->m_Legende )
|
||||
msg = WsItem->m_Legende;
|
||||
plotter->Text( pos, plotClr, msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
|
||||
case WS_IDENTSHEET_D:
|
||||
if( WsItem->m_Legende )
|
||||
msg = WsItem->m_Legende;
|
||||
msg << aSheetNumber;
|
||||
plotter->Text( pos, plotClr, msg, TEXT_ORIENT_HORIZ, text_size,
|
||||
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
|
||||
PLOTTER::DEFAULT_LINE_WIDTH, false, false );
|
||||
break;
|
||||
|
||||
case WS_LEFT_SEGMENT_D:
|
||||
case WS_SEGMENT_D:
|
||||
plotter->MoveTo( pos );
|
||||
pos.x = ( ref.x - WsItem->m_Endx ) * iusPerMil;
|
||||
pos.y = ( ref.y - WsItem->m_Endy ) * iusPerMil;
|
||||
plotter->FinishTo( pos );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
ref.x = pageSize.x - GRID_REF_W - aPageInfo.GetRightMarginMils();
|
||||
ref.y = pageSize.y - GRID_REF_W - aPageInfo.GetBottomMarginMils();
|
||||
|
||||
|
@ -603,4 +859,5 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
|
|
@ -609,12 +609,20 @@ void DIALOG_PAGES_SETTINGS::UpdatePageLayoutExample()
|
|||
wxPoint pointLeftTop( pageDUMMY.GetLeftMarginMils(), pageDUMMY.GetTopMarginMils() );
|
||||
wxPoint pointRightBottom( pageDUMMY.GetRightMarginMils(), pageDUMMY.GetBottomMarginMils() );
|
||||
|
||||
// Get page type
|
||||
int idx = m_paperSizeComboBox->GetSelection();
|
||||
|
||||
if( idx < 0 )
|
||||
idx = 0;
|
||||
|
||||
wxString paperType = m_pageFmt[idx].Left( m_pageFmt[idx].Index( wxT( " " ) ) );
|
||||
|
||||
// Draw layout preview.
|
||||
wxString emptyString;
|
||||
GRResetPenAndBrush( ( wxDC* ) &memDC );
|
||||
|
||||
m_Parent->TraceWorkSheet( (wxDC*) &memDC, dummySize, pointLeftTop, pointRightBottom,
|
||||
emptyString, emptyString, m_tb, m_Screen->m_NumberOfScreens,
|
||||
paperType, emptyString, m_tb, m_Screen->m_NumberOfScreens,
|
||||
m_Screen->m_ScreenNumber, 1, appScale, LIGHTGRAY, RED );
|
||||
|
||||
memDC.SelectObject( wxNullBitmap );
|
||||
|
|
|
@ -122,7 +122,11 @@ int NegableTextLength( const wxString& aText )
|
|||
{
|
||||
if( aText[i] == '~' )
|
||||
{
|
||||
char_count--;
|
||||
/* '~~' draw as '~' and count as two chars */
|
||||
if( i > 0 && aText[i - 1] == '~' )
|
||||
i--;
|
||||
else
|
||||
char_count--;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,9 +164,13 @@ int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, boo
|
|||
{
|
||||
int AsciiCode = aText[i];
|
||||
|
||||
if( AsciiCode == '~' ) /* Skip the negation marks */
|
||||
/* Skip the negation marks
|
||||
* and first '~' char of '~~'
|
||||
* ('~~' draw as '~') */
|
||||
if( AsciiCode == '~' )
|
||||
{
|
||||
continue;
|
||||
if( i > 0 && aText[i - 1] != '~' )
|
||||
continue;
|
||||
}
|
||||
|
||||
const char* ptcar = GetHersheyShapeDescription( AsciiCode );
|
||||
|
@ -406,37 +414,44 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel,
|
|||
overbar_italic_comp = 0;
|
||||
};
|
||||
|
||||
int overbars = 0; // Number of ~ seen
|
||||
int overbars = 0; /* Number of '~' seen (except '~~') */
|
||||
ptr = 0; /* ptr = text index */
|
||||
while( ptr < char_count )
|
||||
{
|
||||
if( aText[ptr + overbars] == '~' )
|
||||
{
|
||||
/* Found an overbar, adjust the pointers */
|
||||
overbars++;
|
||||
if( ptr + overbars + 1 < aText.length() &&
|
||||
aText[ptr + overbars + 1] == '~' ) /* '~~' draw as '~' */
|
||||
ptr++; // skip first '~' char and draw second
|
||||
|
||||
if( overbars & 1 ) // odd overbars count
|
||||
{
|
||||
/* Starting the overbar */
|
||||
overbar_pos = current_char_pos;
|
||||
overbar_pos.x += overbar_italic_comp;
|
||||
overbar_pos.y -= OverbarPositionY( size_v, aWidth );
|
||||
RotatePoint( &overbar_pos, aPos, aOrient );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Ending the overbar */
|
||||
coord[0] = overbar_pos;
|
||||
overbar_pos = current_char_pos;
|
||||
overbar_pos.x += overbar_italic_comp;
|
||||
overbar_pos.y -= OverbarPositionY( size_v, aWidth );
|
||||
RotatePoint( &overbar_pos, aPos, aOrient );
|
||||
coord[1] = overbar_pos;
|
||||
/* Plot the overbar segment */
|
||||
DrawGraphicTextPline( clipBox, aDC, aColor, aWidth,
|
||||
sketch_mode, 2, coord, aCallback, aPlotter );
|
||||
/* Found an overbar, adjust the pointers */
|
||||
overbars++;
|
||||
|
||||
if( overbars & 1 ) // odd overbars count
|
||||
{
|
||||
/* Starting the overbar */
|
||||
overbar_pos = current_char_pos;
|
||||
overbar_pos.x += overbar_italic_comp;
|
||||
overbar_pos.y -= OverbarPositionY( size_v, aWidth );
|
||||
RotatePoint( &overbar_pos, aPos, aOrient );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Ending the overbar */
|
||||
coord[0] = overbar_pos;
|
||||
overbar_pos = current_char_pos;
|
||||
overbar_pos.x += overbar_italic_comp;
|
||||
overbar_pos.y -= OverbarPositionY( size_v, aWidth );
|
||||
RotatePoint( &overbar_pos, aPos, aOrient );
|
||||
coord[1] = overbar_pos;
|
||||
/* Plot the overbar segment */
|
||||
DrawGraphicTextPline( clipBox, aDC, aColor, aWidth,
|
||||
sketch_mode, 2, coord, aCallback, aPlotter );
|
||||
}
|
||||
continue; /* Skip ~ processing */
|
||||
}
|
||||
continue; /* Skip ~ processing */
|
||||
}
|
||||
|
||||
AsciiCode = aText.GetChar( ptr + overbars );
|
||||
|
|
|
@ -123,7 +123,7 @@ const char* const newstroke_font[] =
|
|||
"KYVcUcSbR`RVQTOSQRRPRFSDUCVC",
|
||||
"H\\RbRD",
|
||||
"KYNcOcQbR`RVSTUSSRRPRFQDOCNC",
|
||||
"KZMHNGPFTHVGWF",
|
||||
"KZMSNRPQTSVRWQ",
|
||||
"F^K[KFYFY[K[",
|
||||
/* // LATIN-1 SUPPLEMENT (0080-00FF) */
|
||||
"F^K[KFYFY[K[", /* U+80 */
|
||||
|
|
2246
common/worksheet.cpp
2246
common/worksheet.cpp
File diff suppressed because it is too large
Load Diff
|
@ -155,7 +155,11 @@ static bool engStrToDouble( wxString aStr, double* aDouble )
|
|||
aStr.Append( wxT( "R" ) );
|
||||
|
||||
// Regular expression for a value string, e.g., 47k2
|
||||
#if defined(KICAD_GOST)
|
||||
static wxRegEx valueRegEx( wxT( "^([0-9]+)(мк|[pnumRkKMGT.,кнМГ])([0-9]*)(мк*|[pnumRkKMGTкнМГ]*)" ) );
|
||||
#else
|
||||
static wxRegEx valueRegEx( wxT( "^([0-9]+)([pnumRkKMGT.,])([0-9]*)([pnumRkKMGT]*)" ) );
|
||||
#endif
|
||||
|
||||
if( !valueRegEx.Matches( aStr ) )
|
||||
return false;
|
||||
|
@ -164,7 +168,31 @@ static bool engStrToDouble( wxString aStr, double* aDouble )
|
|||
+ wxT( "." )
|
||||
+ valueRegEx.GetMatch( aStr, 3 ) );
|
||||
wxString multiplierString = valueRegEx.GetMatch( aStr, 2 );
|
||||
#if defined(KICAD_GOST)
|
||||
if ( multiplierString == wxT( "мк" ) )
|
||||
multiplierString = wxT( "u" );
|
||||
else if ( multiplierString == wxT( "к" ) )
|
||||
multiplierString = wxT( "k" );
|
||||
else if ( multiplierString == wxT( "н" ) )
|
||||
multiplierString = wxT( "n" );
|
||||
else if ( multiplierString == wxT( "М" ) )
|
||||
multiplierString = wxT( "M" );
|
||||
else if ( multiplierString == wxT( "Г" ) )
|
||||
multiplierString = wxT( "G" );
|
||||
#endif
|
||||
wxString post_multiplierString = valueRegEx.GetMatch( aStr, 4 );
|
||||
#if defined(KICAD_GOST)
|
||||
if ( post_multiplierString == wxT( "мк" ) )
|
||||
multiplierString = wxT( "u" );
|
||||
else if ( post_multiplierString == wxT( "к" ) )
|
||||
multiplierString = wxT( "k" );
|
||||
else if ( post_multiplierString == wxT( "н" ) )
|
||||
multiplierString = wxT( "n" );
|
||||
else if ( post_multiplierString == wxT( "М" ) )
|
||||
multiplierString = wxT( "M" );
|
||||
else if ( post_multiplierString == wxT( "Г" ) )
|
||||
multiplierString = wxT( "G" );
|
||||
#endif
|
||||
double multiplier;
|
||||
|
||||
switch( (wxChar)multiplierString[0] )
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#define PIN_LENGTH 300 /* Default Length of each pin to be drawn. */
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
#define INVERT_PIN_RADIUS 20 /* Radius of inverted pin circle. */
|
||||
#define INVERT_PIN_RADIUS 30 /* Radius of inverted pin circle. */
|
||||
#else
|
||||
#define INVERT_PIN_RADIUS 35 /* Radius of inverted pin circle. */
|
||||
#endif
|
||||
|
|
|
@ -469,7 +469,11 @@ void LIB_EDIT_FRAME::UpdatePartSelectList()
|
|||
for( int i = 0; i < m_component->GetPartCount(); i++ )
|
||||
{
|
||||
wxString msg;
|
||||
#if defined(KICAD_GOST)
|
||||
msg.Printf( _( "Part %d" ), i + 1 );
|
||||
#else
|
||||
msg.Printf( _( "Part %c" ), 'A' + i );
|
||||
#endif
|
||||
m_partSelectBox->Append( msg );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,11 @@
|
|||
SCH_JUNCTION::SCH_JUNCTION( const wxPoint& pos ) :
|
||||
SCH_ITEM( NULL, SCH_JUNCTION_T )
|
||||
{
|
||||
#if defined(KICAD_GOST)
|
||||
#define DRAWJUNCTION_DIAMETER 50 /* Diameter of junction symbol between wires by GOST*/
|
||||
#else
|
||||
#define DRAWJUNCTION_DIAMETER 32 /* Diameter of junction symbol between wires */
|
||||
#endif
|
||||
m_pos = pos;
|
||||
m_Layer = LAYER_JUNCTION;
|
||||
m_size.x = m_size.y = DRAWJUNCTION_DIAMETER;
|
||||
|
|
|
@ -10,72 +10,17 @@
|
|||
#include <common.h> // Mm2mils()
|
||||
|
||||
#define GRID_REF_W 70 // height of the band reference grid
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
#define SIZETEXT 100 // worksheet text size
|
||||
#else
|
||||
#define SIZETEXT 60 // worksheet text size
|
||||
#endif
|
||||
|
||||
#define SIZETEXT_REF 50 // worksheet frame reference text size
|
||||
#define PAS_REF 2000 // no reference markings on worksheet frame
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
|
||||
// There is a page layout minor issue in GOST mode.
|
||||
// This is the rounding-off error of 1 mil exactly.
|
||||
// I hope this problem will go away when we will go
|
||||
// to nanometers (zaka62).
|
||||
#define STAMP_OX Mm2mils( 185 ) + 1
|
||||
#define STAMP_OY Mm2mils( 55 )
|
||||
|
||||
#define STAMP_Y_0 0
|
||||
#define STAMP_Y_5 Mm2mils( 5 )
|
||||
#define STAMP_Y_8 Mm2mils( 8 )
|
||||
#define STAMP_Y_7 Mm2mils( 7 )
|
||||
#define STAMP_Y_10 Mm2mils( 10 )
|
||||
#define STAMP_Y_14 Mm2mils( 14 )
|
||||
#define STAMP_Y_15 Mm2mils( 15 )
|
||||
#define STAMP_Y_20 Mm2mils( 20 )
|
||||
#define STAMP_Y_25 Mm2mils( 25 )
|
||||
#define STAMP_Y_30 Mm2mils( 30 )
|
||||
#define STAMP_Y_35 Mm2mils( 35 )
|
||||
#define STAMP_Y_40 Mm2mils( 40 )
|
||||
#define STAMP_Y_45 Mm2mils( 45 )
|
||||
#define STAMP_Y_50 Mm2mils( 50 )
|
||||
#define STAMP_Y_55 Mm2mils( 55 )
|
||||
|
||||
#define STAMP_X_0 0
|
||||
#define STAMP_X_10 Mm2mils( 10 )
|
||||
#define STAMP_X_14 Mm2mils( 14 )
|
||||
#define STAMP_X_18 Mm2mils( 18 )
|
||||
#define STAMP_X_30 Mm2mils( 30 )
|
||||
#define STAMP_X_35 Mm2mils( 35 )
|
||||
#define STAMP_X_40 Mm2mils( 40 )
|
||||
#define STAMP_X_45 Mm2mils( 45 )
|
||||
#define STAMP_X_50 Mm2mils( 50 )
|
||||
#define STAMP_X_53 Mm2mils( 53 )
|
||||
#define STAMP_X_65 Mm2mils( 65 )
|
||||
#define STAMP_X_70 Mm2mils( 70 )
|
||||
#define STAMP_X_84 Mm2mils( 84 )
|
||||
#define STAMP_X_85 Mm2mils( 85 )
|
||||
#define STAMP_X_120 Mm2mils( 120 )
|
||||
#define STAMP_X_130 Mm2mils( 130 )
|
||||
#define STAMP_X_137 Mm2mils( 137 )
|
||||
#define STAMP_X_145 Mm2mils( 145 )
|
||||
#define STAMP_X_168 Mm2mils( 168 )
|
||||
#define STAMP_X_178 Mm2mils( 178 )
|
||||
#define STAMP_X_185 Mm2mils( 185 )
|
||||
|
||||
#define STAMP_5 Mm2mils( 5 )
|
||||
#define STAMP_7 Mm2mils( 7 )
|
||||
#define STAMP_12 Mm2mils( 12 )
|
||||
|
||||
#define STAMP_145 Mm2mils( 145 )
|
||||
#define STAMP_110 Mm2mils( 110 )
|
||||
#define STAMP_85 Mm2mils( 85 )
|
||||
#define STAMP_60 Mm2mils( 60 )
|
||||
#define STAMP_25 Mm2mils( 25 )
|
||||
|
||||
#define STAMP_287 Mm2mils( 287 )
|
||||
#define STAMP_227 Mm2mils( 227 )
|
||||
#define STAMP_167 Mm2mils( 167 )
|
||||
#endif
|
||||
|
||||
#if !defined(KICAD_GOST)
|
||||
|
||||
// The coordinates below are relative to the bottom right corner of page and
|
||||
// will be subtracted from this origin.
|
||||
|
@ -97,13 +42,15 @@
|
|||
#define BLOCK_FILENAME_X BLOCK_OX - SIZETEXT
|
||||
#define BLOCK_FILENAME_Y (SIZETEXT * 9)
|
||||
#define BLOCK_COMMENT_X BLOCK_OX - SIZETEXT
|
||||
#define VARIABLE_BLOCK_START_POSITION (SIZETEXT * 10)
|
||||
#define BLOCK_COMPANY_Y (SIZETEXT * 11)
|
||||
#define BLOCK_COMMENT1_Y (SIZETEXT * 13)
|
||||
#define BLOCK_COMMENT2_Y (SIZETEXT * 15)
|
||||
#define BLOCK_COMMENT3_Y (SIZETEXT * 17)
|
||||
#define BLOCK_COMMENT4_Y (SIZETEXT * 19)
|
||||
|
||||
#endif
|
||||
|
||||
#define VARIABLE_BLOCK_START_POSITION (SIZETEXT * 10)
|
||||
|
||||
struct Ki_WorkSheetData
|
||||
{
|
||||
|
@ -119,17 +66,17 @@ public:
|
|||
|
||||
/// Work sheet structure type definitions.
|
||||
enum TypeKi_WorkSheetData {
|
||||
#if defined(KICAD_GOST)
|
||||
WS_OSN,
|
||||
WS_TONK,
|
||||
WS_TEXT,
|
||||
WS_TEXTL
|
||||
#else
|
||||
WS_DATE,
|
||||
WS_REV,
|
||||
WS_KICAD_VERSION,
|
||||
#if defined(KICAD_GOST)
|
||||
WS_PODPIS,
|
||||
#endif
|
||||
WS_SIZESHEET,
|
||||
WS_IDENTSHEET,
|
||||
#if defined(KICAD_GOST)
|
||||
WS_SHEETS,
|
||||
#endif
|
||||
WS_TITLE,
|
||||
WS_FILENAME,
|
||||
WS_FULLSHEETNAME,
|
||||
|
@ -141,20 +88,110 @@ enum TypeKi_WorkSheetData {
|
|||
WS_SEGMENT,
|
||||
WS_UPPER_SEGMENT,
|
||||
WS_LEFT_SEGMENT,
|
||||
#if defined(KICAD_GOST)
|
||||
WS_CADRE,
|
||||
WS_LEFT_SEGMENT_D,
|
||||
WS_SEGMENT_D,
|
||||
WS_PODPIS_D,
|
||||
WS_IDENTSHEET_D,
|
||||
WS_SEGMENT_LU,
|
||||
WS_SEGMENT_LT,
|
||||
WS_PODPIS_LU
|
||||
#else
|
||||
WS_CADRE
|
||||
#endif
|
||||
};
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
|
||||
extern Ki_WorkSheetData WS_Osn1_Line1;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line2;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line3;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line4;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line5;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line6;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line7;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line8;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line9;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line10;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line11;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line12;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line13;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line14;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line15;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line16;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line17;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line18;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line19;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line20;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line21;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line22;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line23;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line24;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line25;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line26;
|
||||
extern Ki_WorkSheetData WS_Osn1_Line27;
|
||||
|
||||
extern Ki_WorkSheetData WS_Osn1_Text1;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text2;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text3;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text4;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text5;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text6;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text7;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text8;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text9;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text10;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text11;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text12;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text13;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text14;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text15;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text16;
|
||||
extern Ki_WorkSheetData WS_Osn1_Text17;
|
||||
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line1;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line2;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line3;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line4;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line5;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line6;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line7;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line8;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line9;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line10;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Line11;
|
||||
|
||||
extern Ki_WorkSheetData WS_Osn2a_Text1;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Text2;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Text3;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Text4;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Text5;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Text6;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Text7;
|
||||
extern Ki_WorkSheetData WS_Osn2a_Text8;
|
||||
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line1;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line2;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line3;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line4;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line5;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line6;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line7;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line8;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line9;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line10;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line11;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line12;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line13;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Line14;
|
||||
|
||||
extern Ki_WorkSheetData WS_DopLeft_Text1;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Text2;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Text3;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Text4;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Text5;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Text6;
|
||||
extern Ki_WorkSheetData WS_DopLeft_Text7;
|
||||
|
||||
extern Ki_WorkSheetData WS_DopTop_Line1;
|
||||
extern Ki_WorkSheetData WS_DopTop_Line2;
|
||||
extern Ki_WorkSheetData WS_DopTop_Line3;
|
||||
extern Ki_WorkSheetData WS_DopTop_Line4;
|
||||
extern Ki_WorkSheetData WS_DopTop_Line5;
|
||||
extern Ki_WorkSheetData WS_DopTop_Line6;
|
||||
|
||||
#else
|
||||
extern Ki_WorkSheetData WS_Date;
|
||||
extern Ki_WorkSheetData WS_Revision;
|
||||
extern Ki_WorkSheetData WS_Licence;
|
||||
|
@ -176,85 +213,6 @@ extern Ki_WorkSheetData WS_Segm4;
|
|||
extern Ki_WorkSheetData WS_Segm5;
|
||||
extern Ki_WorkSheetData WS_Segm6;
|
||||
extern Ki_WorkSheetData WS_Segm7;
|
||||
|
||||
#if defined(KICAD_GOST)
|
||||
extern Ki_WorkSheetData WS_Izm;
|
||||
extern Ki_WorkSheetData WS_Razr;
|
||||
extern Ki_WorkSheetData WS_Prov;
|
||||
extern Ki_WorkSheetData WS_TKon;
|
||||
extern Ki_WorkSheetData WS_NKon;
|
||||
extern Ki_WorkSheetData WS_Utv;
|
||||
extern Ki_WorkSheetData WS_List;
|
||||
extern Ki_WorkSheetData WS_NDoc;
|
||||
extern Ki_WorkSheetData WS_Podp;
|
||||
extern Ki_WorkSheetData WS_Data;
|
||||
extern Ki_WorkSheetData WS_Art;
|
||||
extern Ki_WorkSheetData WS_Mass;
|
||||
extern Ki_WorkSheetData WS_Msht;
|
||||
extern Ki_WorkSheetData WS_List1;
|
||||
extern Ki_WorkSheetData WS_List2;
|
||||
extern Ki_WorkSheetData WS_Segm8;
|
||||
extern Ki_WorkSheetData WS_Segm9;
|
||||
extern Ki_WorkSheetData WS_Segm10;
|
||||
extern Ki_WorkSheetData WS_Segm11;
|
||||
extern Ki_WorkSheetData WS_Segm12;
|
||||
extern Ki_WorkSheetData WS_Segm13;
|
||||
extern Ki_WorkSheetData WS_Segm14;
|
||||
extern Ki_WorkSheetData WS_Segm15;
|
||||
extern Ki_WorkSheetData WS_Segm16;
|
||||
extern Ki_WorkSheetData WS_Segm17;
|
||||
extern Ki_WorkSheetData WS_Segm18;
|
||||
extern Ki_WorkSheetData WS_Segm19;
|
||||
extern Ki_WorkSheetData WS_Segm20;
|
||||
extern Ki_WorkSheetData WS_Segm21;
|
||||
extern Ki_WorkSheetData WS_Segm22;
|
||||
extern Ki_WorkSheetData WS_Segm23;
|
||||
extern Ki_WorkSheetData WS_Segm24;
|
||||
extern Ki_WorkSheetData WS_Segm25;
|
||||
extern Ki_WorkSheetData WS_CADRE_D;
|
||||
extern Ki_WorkSheetData WS_Segm1_D;
|
||||
extern Ki_WorkSheetData WS_Segm2_D;
|
||||
extern Ki_WorkSheetData WS_Segm3_D;
|
||||
extern Ki_WorkSheetData WS_Segm4_D;
|
||||
extern Ki_WorkSheetData WS_Segm5_D;
|
||||
extern Ki_WorkSheetData WS_Segm6_D;
|
||||
extern Ki_WorkSheetData WS_Segm7_D;
|
||||
extern Ki_WorkSheetData WS_Segm8_D;
|
||||
extern Ki_WorkSheetData WS_Segm9_D;
|
||||
extern Ki_WorkSheetData WS_Segm10_D;
|
||||
extern Ki_WorkSheetData WS_Segm11_D;
|
||||
extern Ki_WorkSheetData WS_Izm_D;
|
||||
extern Ki_WorkSheetData WS_List_D;
|
||||
extern Ki_WorkSheetData WS_NDoc_D;
|
||||
extern Ki_WorkSheetData WS_Podp_D;
|
||||
extern Ki_WorkSheetData WS_Date_D;
|
||||
extern Ki_WorkSheetData WS_List1_D;
|
||||
extern Ki_WorkSheetData WS_ListN_D;
|
||||
extern Ki_WorkSheetData WS_Segm1_LU;
|
||||
extern Ki_WorkSheetData WS_Segm2_LU;
|
||||
extern Ki_WorkSheetData WS_Segm3_LU;
|
||||
extern Ki_WorkSheetData WS_Segm4_LU;
|
||||
extern Ki_WorkSheetData WS_Segm5_LU;
|
||||
extern Ki_WorkSheetData WS_Segm6_LU;
|
||||
extern Ki_WorkSheetData WS_Segm7_LU;
|
||||
extern Ki_WorkSheetData WS_Segm8_LU;
|
||||
extern Ki_WorkSheetData WS_Segm9_LU;
|
||||
extern Ki_WorkSheetData WS_Segm10_LU;
|
||||
extern Ki_WorkSheetData WS_Segm11_LU;
|
||||
extern Ki_WorkSheetData WS_Segm12_LU;
|
||||
extern Ki_WorkSheetData WS_Segm13_LU;
|
||||
extern Ki_WorkSheetData WS_Podp1_LU;
|
||||
extern Ki_WorkSheetData WS_Podp2_LU;
|
||||
extern Ki_WorkSheetData WS_Podp3_LU;
|
||||
extern Ki_WorkSheetData WS_Podp4_LU;
|
||||
extern Ki_WorkSheetData WS_Podp5_LU;
|
||||
extern Ki_WorkSheetData WS_Podp6_LU;
|
||||
extern Ki_WorkSheetData WS_Podp7_LU;
|
||||
extern Ki_WorkSheetData WS_Segm1_LT;
|
||||
extern Ki_WorkSheetData WS_Segm2_LT;
|
||||
extern Ki_WorkSheetData WS_Segm3_LT;
|
||||
extern Ki_WorkSheetData WS_Segm4_LT;
|
||||
extern Ki_WorkSheetData WS_Segm5_LT;
|
||||
#endif
|
||||
|
||||
#endif // WORKSHEET_H_
|
||||
|
|
|
@ -924,7 +924,7 @@ bool GPCB_PLUGIN::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES*
|
|||
|
||||
if( tmp.GetExt() != KiCadFootprintFileExtension )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%'" ),
|
||||
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%s'" ),
|
||||
files[i].GetData(), aLibraryPath.GetData() ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1770,7 +1770,7 @@ bool PCB_IO::FootprintLibDelete( const wxString& aLibraryPath, PROPERTIES* aProp
|
|||
|
||||
if( tmp.GetExt() != KiCadFootprintFileExtension )
|
||||
{
|
||||
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%'" ),
|
||||
THROW_IO_ERROR( wxString::Format( _( "unexpected file '%s' has found in library path '%s'" ),
|
||||
files[i].GetData(), aLibraryPath.GetData() ) );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue