Don't make assumptions about what layers things are on.
This commit is contained in:
parent
a1f09befe0
commit
ba63ac801a
|
@ -254,9 +254,7 @@ void DIMENSION_BASE::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
|||
{
|
||||
Mirror( aCentre );
|
||||
|
||||
// DIMENSION items are not usually on copper layers, so
|
||||
// copper layers count is not taken in accoun in Flip transform
|
||||
SetLayer( FlipLayer( GetLayer() ) );
|
||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -210,10 +210,7 @@ void FP_SHAPE::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
|||
break;
|
||||
}
|
||||
|
||||
// PCB_SHAPE items are not usually on copper layers, but it can happen in microwave apps.
|
||||
// However, currently, only on Front or Back layers.
|
||||
// So the copper layers count is not taken in account
|
||||
SetLayer( FlipLayer( GetLayer() ) );
|
||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||
}
|
||||
|
||||
bool FP_SHAPE::IsParentFlipped() const
|
||||
|
|
|
@ -149,7 +149,7 @@ void FP_TEXT::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
|||
|
||||
SetTextAngle( -GetTextAngle() );
|
||||
|
||||
SetLayer( FlipLayer( GetLayer() ) );
|
||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||
SetMirrored( IsBackLayer( GetLayer() ) );
|
||||
SetLocalCoord();
|
||||
|
||||
|
|
|
@ -308,9 +308,7 @@ void PCB_SHAPE::Flip( const wxPoint& aCentre, bool aFlipLeftRight )
|
|||
break;
|
||||
}
|
||||
|
||||
// PCB_SHAPE items are not allowed on copper layers, so
|
||||
// copper layers count is not taken in account in Flip transform
|
||||
SetLayer( FlipLayer( GetLayer() ) );
|
||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ void PCB_TARGET::Flip(const wxPoint& aCentre, bool aFlipLeftRight )
|
|||
else
|
||||
m_pos.y = aCentre.y - ( m_pos.y - aCentre.y );
|
||||
|
||||
SetLayer( FlipLayer( GetLayer() ) );
|
||||
SetLayer( FlipLayer( GetLayer(), GetBoard()->GetCopperLayerCount() ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue