Don't apply last line width to text thickness in symbol library editor.
The symbol library header was setting the text thickness using the last line thickness setting which is incorrect so use the default thickness when creating new text objects. Fixes lp:1635344 https://bugs.launchpad.net/kicad/+bug/1635344
This commit is contained in:
parent
6a9f38ecc4
commit
4e8a35cb84
|
@ -2,8 +2,8 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2006 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
|
||||
* Copyright (C) 2009-2011 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2004-2011 KiCad Developers, see change_log.txt for contributors.
|
||||
* Copyright (C) 2009-2017 Wayne Stambaugh <stambaughw@verizon.net>
|
||||
* Copyright (C) 2004-2017 KiCad Developers, see change_log.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -115,6 +115,7 @@ void LIB_EDIT_FRAME::EditGraphicSymbol( wxDC* DC, LIB_ITEM* DrawItem )
|
|||
|
||||
if( component )
|
||||
component->GetDrawItemList().sort();
|
||||
|
||||
OnModify( );
|
||||
|
||||
MSG_PANEL_ITEMS items;
|
||||
|
@ -206,11 +207,17 @@ LIB_ITEM* LIB_EDIT_FRAME::CreateGraphicItem( LIB_PART* LibEntry, wxDC* DC )
|
|||
if( m_drawItem )
|
||||
{
|
||||
m_drawItem->BeginEdit( IS_NEW, drawPos );
|
||||
m_drawItem->SetWidth( m_drawLineWidth );
|
||||
m_drawItem->SetFillMode( m_drawFillStyle );
|
||||
|
||||
// Don't set line parameters for text objects.
|
||||
if( m_drawItem->Type() != LIB_TEXT_T )
|
||||
{
|
||||
m_drawItem->SetWidth( m_drawLineWidth );
|
||||
m_drawItem->SetFillMode( m_drawFillStyle );
|
||||
}
|
||||
|
||||
if( m_drawSpecificUnit )
|
||||
m_drawItem->SetUnit( m_unit );
|
||||
|
||||
if( m_drawSpecificConvert )
|
||||
m_drawItem->SetConvert( m_convert );
|
||||
|
||||
|
@ -322,14 +329,14 @@ static void SymbolDisplayDraw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
|
|||
return;
|
||||
|
||||
item->SetEraseLastDrawItem( aErase );
|
||||
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ), UNSPECIFIED_COLOR, g_XorMode, NULL,
|
||||
DefaultTransform );
|
||||
item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ), UNSPECIFIED_COLOR,
|
||||
g_XorMode, NULL, DefaultTransform );
|
||||
}
|
||||
|
||||
|
||||
void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC )
|
||||
{
|
||||
if( LIB_PART* part = GetCurPart() )
|
||||
if( LIB_PART* part = GetCurPart() )
|
||||
{
|
||||
if( !m_drawItem )
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue