Commit 4b212810 authored by charras's avatar charras

minor bugs fixed (including plot labels issues)

parent ceb1de9e
...@@ -126,6 +126,7 @@ SCH_TEXT* SCH_TEXT::GenCopy() ...@@ -126,6 +126,7 @@ SCH_TEXT* SCH_TEXT::GenCopy()
newitem->m_HJustify = m_HJustify; newitem->m_HJustify = m_HJustify;
newitem->m_VJustify = m_VJustify; newitem->m_VJustify = m_VJustify;
newitem->m_IsDangling = m_IsDangling; newitem->m_IsDangling = m_IsDangling;
newitem->m_Italic = m_Italic;
return newitem; return newitem;
} }
......
...@@ -262,7 +262,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem ) ...@@ -262,7 +262,7 @@ void PlotLibPart( SCH_COMPONENT* DrawLibItem )
t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT, t1 ? TEXT_ORIENT_HORIZ : TEXT_ORIENT_VERT,
Text->m_Size, Text->m_Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_CENTER,
thickness); thickness, false, true);
} }
break; break;
...@@ -476,7 +476,7 @@ static void PlotTextField( SCH_COMPONENT* DrawLibItem, ...@@ -476,7 +476,7 @@ static void PlotTextField( SCH_COMPONENT* DrawLibItem,
orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ, orient ? TEXT_ORIENT_VERT : TEXT_ORIENT_HORIZ,
field->m_Size, field->m_Size,
hjustify, vjustify, hjustify, vjustify,
thickness, field->m_Italic); thickness, field->m_Italic, true);
} }
else /* We plt the reference, for a multiple parts per package */ else /* We plt the reference, for a multiple parts per package */
{ {
...@@ -683,12 +683,12 @@ void PlotTextStruct( EDA_BaseStruct* Struct ) ...@@ -683,12 +683,12 @@ void PlotTextStruct( EDA_BaseStruct* Struct )
PlotGraphicText( g_PlotFormat, wxPoint( pX - offset, pY ), PlotGraphicText( g_PlotFormat, wxPoint( pX - offset, pY ),
color, Text, TEXT_ORIENT_HORIZ, Size, color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_CENTER,
thickness, italic ); thickness, italic, true );
else else
PlotGraphicText( g_PlotFormat, wxPoint( pX, pY - offset ), PlotGraphicText( g_PlotFormat, wxPoint( pX, pY - offset ),
color, Text, TEXT_ORIENT_HORIZ, Size, color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_BOTTOM,
thickness, italic ); thickness, italic, true );
break; break;
case 1: /* Orientation vert UP */ case 1: /* Orientation vert UP */
...@@ -696,12 +696,12 @@ void PlotTextStruct( EDA_BaseStruct* Struct ) ...@@ -696,12 +696,12 @@ void PlotTextStruct( EDA_BaseStruct* Struct )
PlotGraphicText( g_PlotFormat, wxPoint( pX, pY + offset ), PlotGraphicText( g_PlotFormat, wxPoint( pX, pY + offset ),
color, Text, TEXT_ORIENT_VERT, Size, color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_TOP,
thickness, italic ); thickness, italic, true );
else else
PlotGraphicText( g_PlotFormat, wxPoint( pX - offset, pY ), PlotGraphicText( g_PlotFormat, wxPoint( pX - offset, pY ),
color, Text, TEXT_ORIENT_VERT, Size, color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM,
thickness, italic ); thickness, italic, true );
break; break;
case 2: /* Horiz Orientation - Right justified */ case 2: /* Horiz Orientation - Right justified */
...@@ -709,12 +709,12 @@ void PlotTextStruct( EDA_BaseStruct* Struct ) ...@@ -709,12 +709,12 @@ void PlotTextStruct( EDA_BaseStruct* Struct )
PlotGraphicText( g_PlotFormat, wxPoint( pX + offset, pY ), PlotGraphicText( g_PlotFormat, wxPoint( pX + offset, pY ),
color, Text, TEXT_ORIENT_HORIZ, Size, color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER, GR_TEXT_HJUSTIFY_LEFT, GR_TEXT_VJUSTIFY_CENTER,
thickness, italic ); thickness, italic, true );
else else
PlotGraphicText( g_PlotFormat, wxPoint( pX, pY + offset ), PlotGraphicText( g_PlotFormat, wxPoint( pX, pY - offset ),
color, Text, TEXT_ORIENT_HORIZ, Size, color, Text, TEXT_ORIENT_HORIZ, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_BOTTOM,
thickness, italic ); thickness, italic, true );
break; break;
case 3: /* Orientation vert BOTTOM */ case 3: /* Orientation vert BOTTOM */
...@@ -722,12 +722,12 @@ void PlotTextStruct( EDA_BaseStruct* Struct ) ...@@ -722,12 +722,12 @@ void PlotTextStruct( EDA_BaseStruct* Struct )
PlotGraphicText( g_PlotFormat, wxPoint( pX, pY - offset ), PlotGraphicText( g_PlotFormat, wxPoint( pX, pY - offset ),
color, Text, TEXT_ORIENT_VERT, Size, color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM, GR_TEXT_HJUSTIFY_CENTER, GR_TEXT_VJUSTIFY_BOTTOM,
thickness, italic ); thickness, italic, true );
else else
PlotGraphicText( g_PlotFormat, wxPoint( pX + offset, pY ), PlotGraphicText( g_PlotFormat, wxPoint( pX - offset, pY ),
color, Text, TEXT_ORIENT_VERT, Size, color, Text, TEXT_ORIENT_VERT, Size,
GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_TOP, GR_TEXT_HJUSTIFY_RIGHT, GR_TEXT_VJUSTIFY_TOP,
thickness, italic ); thickness, italic, true );
break; break;
} }
...@@ -778,7 +778,7 @@ static void PlotSheetLabelStruct( Hierarchical_PIN_Sheet_Struct* Struct ) ...@@ -778,7 +778,7 @@ static void PlotSheetLabelStruct( Hierarchical_PIN_Sheet_Struct* Struct )
PlotGraphicText( g_PlotFormat, wxPoint( tposx, posy ), txtcolor, PlotGraphicText( g_PlotFormat, wxPoint( tposx, posy ), txtcolor,
Struct->m_Text, TEXT_ORIENT_HORIZ, wxSize( size, size ), Struct->m_Text, TEXT_ORIENT_HORIZ, wxSize( size, size ),
side, GR_TEXT_VJUSTIFY_CENTER, side, GR_TEXT_VJUSTIFY_CENTER,
thickness, italic ); thickness, italic, true );
/* dessin du symbole de connexion */ /* dessin du symbole de connexion */
if( Struct->m_Edge ) if( Struct->m_Edge )
......
...@@ -330,6 +330,9 @@ void WinEDA_MainFrame::OnOpenFileInTextEditor( wxCommandEvent& event ) ...@@ -330,6 +330,9 @@ void WinEDA_MainFrame::OnOpenFileInTextEditor( wxCommandEvent& event )
wxFileDialog dlg( this, _( "Load File to Edit" ), wxGetCwd(), wxFileDialog dlg( this, _( "Load File to Edit" ), wxGetCwd(),
wxEmptyString, mask,wxFD_OPEN ); wxEmptyString, mask,wxFD_OPEN );
if( dlg.ShowModal() == wxID_CANCEL )
return;
if( dlg.GetPath() && wxGetApp().GetEditorName() ) if( dlg.GetPath() && wxGetApp().GetEditorName() )
ExecuteFile( this, wxGetApp().GetEditorName(), dlg.GetPath() ); ExecuteFile( this, wxGetApp().GetEditorName(), dlg.GetPath() );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment