Eeschema: fix incorrect rotation (CW versus CCW) of some items.

For some (not all) items and for blocks the rotation CCW was in fact a CW rot.
Fixes #9176
https://gitlab.com/kicad/code/kicad/issues/
This commit is contained in:
jean-pierre charras 2021-09-17 18:06:21 +02:00
parent cc14dfe3ca
commit ca33ec05df
2 changed files with 5 additions and 5 deletions

View File

@ -375,7 +375,7 @@ TOOL_ACTION EE_ACTIONS::rotateCW( "eeschema.InteractiveEdit.rotateCW",
TOOL_ACTION EE_ACTIONS::rotateCCW( "eeschema.InteractiveEdit.rotateCCW", TOOL_ACTION EE_ACTIONS::rotateCCW( "eeschema.InteractiveEdit.rotateCCW",
AS_GLOBAL, AS_GLOBAL,
'R', LEGACY_HK_NAME( "Rotate Item" ), 'R', LEGACY_HK_NAME( "Rotate Item" ),
_( "Rotate" ), _( "Rotates selected item(s) counter-clockwise" ), _( "Rotate Counterclockwise" ), _( "Rotates selected item(s) counter-clockwise" ),
BITMAPS::rotate_ccw ); BITMAPS::rotate_ccw );
TOOL_ACTION EE_ACTIONS::mirrorV( "eeschema.InteractiveEdit.mirrorV", TOOL_ACTION EE_ACTIONS::mirrorV( "eeschema.InteractiveEdit.mirrorV",

View File

@ -498,7 +498,7 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
SCH_SHEET_PIN* pin = static_cast<SCH_SHEET_PIN*>( head ); SCH_SHEET_PIN* pin = static_cast<SCH_SHEET_PIN*>( head );
SCH_SHEET* sheet = pin->GetParent(); SCH_SHEET* sheet = pin->GetParent();
for( int i = 0; clockwise ? i < 1 : i < 3; ++i ) for( int i = 0; clockwise ? i < 3 : i < 1; ++i )
pin->Rotate( sheet->GetBoundingBox().GetCenter() ); pin->Rotate( sheet->GetBoundingBox().GetCenter() );
break; break;
@ -507,7 +507,7 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
case SCH_LINE_T: case SCH_LINE_T:
case SCH_BUS_BUS_ENTRY_T: case SCH_BUS_BUS_ENTRY_T:
case SCH_BUS_WIRE_ENTRY_T: case SCH_BUS_WIRE_ENTRY_T:
for( int i = 0; clockwise ? i < 1 : i < 3; ++i ) for( int i = 0; clockwise ? i < 3 : i < 1; ++i )
head->Rotate( rotPoint ); head->Rotate( rotPoint );
break; break;
@ -528,7 +528,7 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
} }
case SCH_BITMAP_T: case SCH_BITMAP_T:
for( int i = 0; clockwise ? i < 1 : i < 3; ++i ) for( int i = 0; clockwise ? i < 3 : i < 1; ++i )
head->Rotate( rotPoint ); head->Rotate( rotPoint );
// The bitmap is cached in Opengl: clear the cache to redraw // The bitmap is cached in Opengl: clear the cache to redraw
@ -571,7 +571,7 @@ int SCH_EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
if( !moving ) if( !moving )
saveCopyInUndoList( item, UNDO_REDO::CHANGED, ii > 0 ); saveCopyInUndoList( item, UNDO_REDO::CHANGED, ii > 0 );
for( int i = 0; clockwise ? i < 1 : i < 3; ++i ) for( int i = 0; clockwise ? i < 3 : i < 1; ++i )
{ {
if( item->Type() == SCH_LINE_T ) if( item->Type() == SCH_LINE_T )
{ {