Treat internal copper layers as side-specific.
Fixes https://gitlab.com/kicad/code/kicad/issues/12726
This commit is contained in:
parent
d37526ba42
commit
f480cbf93f
|
@ -905,9 +905,9 @@ LSET LSET::BackMask()
|
||||||
return saved;
|
return saved;
|
||||||
}
|
}
|
||||||
|
|
||||||
LSET LSET::FrontBackMask()
|
LSET LSET::SideSpecificMask()
|
||||||
{
|
{
|
||||||
static const LSET saved = ( BackTechMask() | FrontTechMask() ).set( F_Cu ).set( B_Cu );
|
static const LSET saved = BackTechMask() | FrontTechMask() | AllCuMask();
|
||||||
return saved;
|
return saved;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -689,7 +689,7 @@ public:
|
||||||
*/
|
*/
|
||||||
static LSET BackMask();
|
static LSET BackMask();
|
||||||
|
|
||||||
static LSET FrontBackMask();
|
static LSET SideSpecificMask();
|
||||||
|
|
||||||
static LSET UserMask();
|
static LSET UserMask();
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ void FP_TEXT::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
|
||||||
|
|
||||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||||
|
|
||||||
if( ( GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( ( GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
SetMirrored( !IsMirrored() );
|
SetMirrored( !IsMirrored() );
|
||||||
|
|
||||||
SetLocalCoord();
|
SetLocalCoord();
|
||||||
|
|
|
@ -279,7 +279,7 @@ void FP_TEXTBOX::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
|
||||||
|
|
||||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||||
|
|
||||||
if( ( GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( ( GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
SetMirrored( !IsMirrored() );
|
SetMirrored( !IsMirrored() );
|
||||||
|
|
||||||
SetLocalCoord();
|
SetLocalCoord();
|
||||||
|
|
|
@ -278,7 +278,7 @@ void PCB_DIMENSION_BASE::Mirror( const VECTOR2I& axis_pos, bool aMirrorLeftRight
|
||||||
INVERT( m_end.y );
|
INVERT( m_end.y );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ( GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( ( GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
m_text.SetMirrored( !m_text.IsMirrored() );
|
m_text.SetMirrored( !m_text.IsMirrored() );
|
||||||
|
|
||||||
Update();
|
Update();
|
||||||
|
|
|
@ -1904,7 +1904,7 @@ void PCB_PAINTER::draw( const PCB_TEXT* aText, int aLayer )
|
||||||
else
|
else
|
||||||
attrs.m_StrokeWidth = getLineThickness( aText->GetEffectiveTextPenWidth() );
|
attrs.m_StrokeWidth = getLineThickness( aText->GetEffectiveTextPenWidth() );
|
||||||
|
|
||||||
if( m_gal->IsFlippedX() && !( aText->GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( m_gal->IsFlippedX() && !( aText->GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
{
|
{
|
||||||
attrs.m_Mirrored = !attrs.m_Mirrored;
|
attrs.m_Mirrored = !attrs.m_Mirrored;
|
||||||
attrs.m_Halign = static_cast<GR_TEXT_H_ALIGN_T>( -attrs.m_Halign );
|
attrs.m_Halign = static_cast<GR_TEXT_H_ALIGN_T>( -attrs.m_Halign );
|
||||||
|
@ -1994,7 +1994,7 @@ void PCB_PAINTER::draw( const PCB_TEXTBOX* aTextBox, int aLayer )
|
||||||
TEXT_ATTRIBUTES attrs = aTextBox->GetAttributes();
|
TEXT_ATTRIBUTES attrs = aTextBox->GetAttributes();
|
||||||
attrs.m_StrokeWidth = getLineThickness( aTextBox->GetEffectiveTextPenWidth() );
|
attrs.m_StrokeWidth = getLineThickness( aTextBox->GetEffectiveTextPenWidth() );
|
||||||
|
|
||||||
if( m_gal->IsFlippedX() && !( aTextBox->GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( m_gal->IsFlippedX() && !( aTextBox->GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
{
|
{
|
||||||
attrs.m_Mirrored = !attrs.m_Mirrored;
|
attrs.m_Mirrored = !attrs.m_Mirrored;
|
||||||
attrs.m_Halign = static_cast<GR_TEXT_H_ALIGN_T>( -attrs.m_Halign );
|
attrs.m_Halign = static_cast<GR_TEXT_H_ALIGN_T>( -attrs.m_Halign );
|
||||||
|
@ -2081,7 +2081,7 @@ void PCB_PAINTER::draw( const FP_TEXT* aText, int aLayer )
|
||||||
else
|
else
|
||||||
attrs.m_StrokeWidth = getLineThickness( aText->GetEffectiveTextPenWidth() );
|
attrs.m_StrokeWidth = getLineThickness( aText->GetEffectiveTextPenWidth() );
|
||||||
|
|
||||||
if( m_gal->IsFlippedX() && !( aText->GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( m_gal->IsFlippedX() && !( aText->GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
{
|
{
|
||||||
attrs.m_Mirrored = !attrs.m_Mirrored;
|
attrs.m_Mirrored = !attrs.m_Mirrored;
|
||||||
attrs.m_Halign = static_cast<GR_TEXT_H_ALIGN_T>( -attrs.m_Halign );
|
attrs.m_Halign = static_cast<GR_TEXT_H_ALIGN_T>( -attrs.m_Halign );
|
||||||
|
@ -2155,7 +2155,7 @@ void PCB_PAINTER::draw( const FP_TEXTBOX* aTextBox, int aLayer )
|
||||||
attrs.m_Angle = aTextBox->GetDrawRotation();
|
attrs.m_Angle = aTextBox->GetDrawRotation();
|
||||||
attrs.m_StrokeWidth = getLineThickness( aTextBox->GetEffectiveTextPenWidth() );
|
attrs.m_StrokeWidth = getLineThickness( aTextBox->GetEffectiveTextPenWidth() );
|
||||||
|
|
||||||
if( m_gal->IsFlippedX() && !( aTextBox->GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( m_gal->IsFlippedX() && !( aTextBox->GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
{
|
{
|
||||||
attrs.m_Mirrored = !attrs.m_Mirrored;
|
attrs.m_Mirrored = !attrs.m_Mirrored;
|
||||||
attrs.m_Halign = static_cast<GR_TEXT_H_ALIGN_T>( -attrs.m_Halign );
|
attrs.m_Halign = static_cast<GR_TEXT_H_ALIGN_T>( -attrs.m_Halign );
|
||||||
|
@ -2446,7 +2446,7 @@ void PCB_PAINTER::draw( const PCB_DIMENSION_BASE* aDimension, int aLayer )
|
||||||
wxString resolvedText = text.GetShownText();
|
wxString resolvedText = text.GetShownText();
|
||||||
TEXT_ATTRIBUTES attrs = text.GetAttributes();
|
TEXT_ATTRIBUTES attrs = text.GetAttributes();
|
||||||
|
|
||||||
if( m_gal->IsFlippedX() && !( aDimension->GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( m_gal->IsFlippedX() && !( aDimension->GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
attrs.m_Mirrored = !attrs.m_Mirrored;
|
attrs.m_Mirrored = !attrs.m_Mirrored;
|
||||||
|
|
||||||
if( outline_mode )
|
if( outline_mode )
|
||||||
|
|
|
@ -247,7 +247,7 @@ void PCB_TEXT::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
|
||||||
|
|
||||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||||
|
|
||||||
if( ( GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( ( GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
SetMirrored( !IsMirrored() );
|
SetMirrored( !IsMirrored() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -384,7 +384,7 @@ void PCB_TEXTBOX::Flip( const VECTOR2I& aCentre, bool aFlipLeftRight )
|
||||||
|
|
||||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||||
|
|
||||||
if( ( GetLayerSet() & LSET::FrontBackMask() ).any() )
|
if( ( GetLayerSet() & LSET::SideSpecificMask() ).any() )
|
||||||
SetMirrored( !IsMirrored() );
|
SetMirrored( !IsMirrored() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue