Added support for decoupling stored text from shown text in EDA_TEXT
Factored out text ellipsing support to max 15 character (for generating menu items)
This commit is contained in:
@@ -235,7 +235,7 @@ void BRDITEMS_PLOTTER::PlotTextModule( TEXTE_MODULE* pt_texte, EDA_COLOR_T aColo
|
||||
bool allow_bold = pt_texte->IsBold() || thickness;
|
||||
|
||||
m_plotter->Text( pos, aColor,
|
||||
pt_texte->GetText(),
|
||||
pt_texte->GetShownText(),
|
||||
orient, size,
|
||||
pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
|
||||
thickness, pt_texte->IsItalic(), allow_bold );
|
||||
@@ -442,8 +442,9 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
|
||||
int thickness;
|
||||
wxPoint pos;
|
||||
wxSize size;
|
||||
wxString shownText( pt_texte->GetShownText() );
|
||||
|
||||
if( pt_texte->GetText().IsEmpty() )
|
||||
if( shownText.IsEmpty() )
|
||||
return;
|
||||
|
||||
if( !m_layerMask[pt_texte->GetLayer()] )
|
||||
@@ -468,7 +469,7 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
|
||||
if( pt_texte->IsMultilineAllowed() )
|
||||
{
|
||||
std::vector<wxPoint> positions;
|
||||
wxArrayString* list = wxStringSplit( pt_texte->GetText(), '\n' );
|
||||
wxArrayString* list = wxStringSplit( shownText, '\n' );
|
||||
positions.reserve( list->Count() );
|
||||
|
||||
pt_texte->GetPositionsOfLinesOfMultilineText( positions, list->Count() );
|
||||
@@ -485,7 +486,7 @@ void BRDITEMS_PLOTTER::PlotTextePcb( TEXTE_PCB* pt_texte )
|
||||
}
|
||||
else
|
||||
{
|
||||
m_plotter->Text( pos, UNSPECIFIED_COLOR, pt_texte->GetText(), orient, size,
|
||||
m_plotter->Text( pos, UNSPECIFIED_COLOR, shownText, orient, size,
|
||||
pt_texte->GetHorizJustify(), pt_texte->GetVertJustify(),
|
||||
thickness, pt_texte->IsItalic(), allow_bold );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user