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