mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 10:13:19 +02:00
Pcbnew: better fix than commit 50d5c6a4
This commit is contained in:
parent
b9f11971ad
commit
016b9deec2
@ -2275,16 +2275,11 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
|
|||||||
// So using the center of the shape is better (the shape does not move)
|
// So using the center of the shape is better (the shape does not move)
|
||||||
if( selection.GetSize() == 1 )
|
if( selection.GetSize() == 1 )
|
||||||
{
|
{
|
||||||
EDA_ITEM* item = static_cast<EDA_ITEM*>( selection.GetItem( 0 ) );
|
PCB_SHAPE* item = dynamic_cast<PCB_SHAPE*>( selection.GetItem( 0 ) );
|
||||||
|
|
||||||
if( item->IsBOARD_ITEM() )
|
if( !item || item->GetShape() != SHAPE_T::RECTANGLE )
|
||||||
{
|
|
||||||
EDA_SHAPE* boardItem = dynamic_cast<EDA_SHAPE*>( item );
|
|
||||||
|
|
||||||
if( !boardItem || boardItem->GetShape() != SHAPE_T::RECTANGLE )
|
|
||||||
refPt = selection.GetReferencePoint();
|
refPt = selection.GetReferencePoint();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
const FLIP_DIRECTION flipDirection = frame()->GetPcbNewSettings()->m_FlipDirection;
|
const FLIP_DIRECTION flipDirection = frame()->GetPcbNewSettings()->m_FlipDirection;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user