PCB, Change Footprint: actually update text attributes

This commit is contained in:
Mike Williams 2023-06-20 12:21:50 -04:00
parent a24c55affe
commit 86e0e1cccb
1 changed files with 5 additions and 7 deletions

View File

@ -2078,17 +2078,17 @@ void processTextItem( const PCB_TEXT& aSrc, PCB_TEXT& aDest,
bool* aUpdated ) bool* aUpdated )
{ {
if( resetText ) if( resetText )
{
*aUpdated |= aSrc.GetText() != aDest.GetText(); *aUpdated |= aSrc.GetText() != aDest.GetText();
else
aDest.SetText( aSrc.GetText() ); aDest.SetText( aSrc.GetText() );
}
if( resetTextLayers ) if( resetTextLayers )
{ {
*aUpdated |= aSrc.GetLayer() != aDest.GetLayer(); *aUpdated |= aSrc.GetLayer() != aDest.GetLayer();
*aUpdated |= aSrc.IsVisible() != aDest.IsVisible(); *aUpdated |= aSrc.IsVisible() != aDest.IsVisible();
}
else
{
aDest.SetLayer( aSrc.GetLayer() ); aDest.SetLayer( aSrc.GetLayer() );
aDest.SetVisible( aSrc.IsVisible() ); aDest.SetVisible( aSrc.IsVisible() );
} }
@ -2101,9 +2101,7 @@ void processTextItem( const PCB_TEXT& aSrc, PCB_TEXT& aDest,
*aUpdated |= aSrc.GetTextThickness() != aDest.GetTextThickness(); *aUpdated |= aSrc.GetTextThickness() != aDest.GetTextThickness();
*aUpdated |= aSrc.GetTextAngle() != aDest.GetTextAngle(); *aUpdated |= aSrc.GetTextAngle() != aDest.GetTextAngle();
*aUpdated |= aSrc.GetFPRelativePosition() != aDest.GetFPRelativePosition(); *aUpdated |= aSrc.GetFPRelativePosition() != aDest.GetFPRelativePosition();
}
else
{
// Careful: the visible bit and position are also set by SetAttributes() // Careful: the visible bit and position are also set by SetAttributes()
bool visible = aDest.IsVisible(); bool visible = aDest.IsVisible();
aDest.SetAttributes( aSrc ); aDest.SetAttributes( aSrc );