eeschema: Rotate bus wire entry components
These components were rotatable as a block but not individually. Fixes: lp:1809448 * https://bugs.launchpad.net/kicad/+bug/1809448
This commit is contained in:
parent
e2b3a1118d
commit
4901481e12
|
@ -157,6 +157,8 @@ const KICAD_T SCH_COLLECTOR::RotatableItems[] = {
|
||||||
SCH_COMPONENT_T,
|
SCH_COMPONENT_T,
|
||||||
SCH_SHEET_T,
|
SCH_SHEET_T,
|
||||||
SCH_BITMAP_T,
|
SCH_BITMAP_T,
|
||||||
|
SCH_BUS_BUS_ENTRY_T,
|
||||||
|
SCH_BUS_WIRE_ENTRY_T,
|
||||||
EOT
|
EOT
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -200,6 +202,8 @@ const KICAD_T SCH_COLLECTOR::SheetsAndSheetLabels[] = {
|
||||||
|
|
||||||
|
|
||||||
const KICAD_T SCH_COLLECTOR::OrientableItems[] = {
|
const KICAD_T SCH_COLLECTOR::OrientableItems[] = {
|
||||||
|
SCH_BUS_BUS_ENTRY_T,
|
||||||
|
SCH_BUS_WIRE_ENTRY_T,
|
||||||
SCH_COMPONENT_T,
|
SCH_COMPONENT_T,
|
||||||
SCH_BITMAP_T,
|
SCH_BITMAP_T,
|
||||||
SCH_SHEET_T,
|
SCH_SHEET_T,
|
||||||
|
|
|
@ -867,8 +867,6 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
item = LocateAndShowItem( data->GetPosition(), SCH_COLLECTOR::RotatableItems,
|
item = LocateAndShowItem( data->GetPosition(), SCH_COLLECTOR::RotatableItems,
|
||||||
aEvent.GetInt() );
|
aEvent.GetInt() );
|
||||||
|
|
||||||
DBG(printf("Rotate Item %p", item);)
|
|
||||||
|
|
||||||
// Exit if no item found at the current location or the item is already being edited.
|
// Exit if no item found at the current location or the item is already being edited.
|
||||||
if( (item == NULL) || (item->GetFlags() != 0) )
|
if( (item == NULL) || (item->GetFlags() != 0) )
|
||||||
return;
|
return;
|
||||||
|
@ -901,6 +899,13 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
ChangeTextOrient( (SCH_TEXT*) item );
|
ChangeTextOrient( (SCH_TEXT*) item );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SCH_BUS_BUS_ENTRY_T:
|
||||||
|
case SCH_BUS_WIRE_ENTRY_T:
|
||||||
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
SaveCopyInUndoList( item, UR_CHANGED );
|
||||||
|
item->Rotate( m_canvas->GetParent()->GetCrossHairPosition() );
|
||||||
|
break;
|
||||||
|
|
||||||
case SCH_FIELD_T:
|
case SCH_FIELD_T:
|
||||||
m_canvas->MoveCursorToCrossHair();
|
m_canvas->MoveCursorToCrossHair();
|
||||||
RotateField( (SCH_FIELD*) item );
|
RotateField( (SCH_FIELD*) item );
|
||||||
|
@ -1290,7 +1295,6 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
// The bitmap is cached in Opengl: clear the cache, because
|
// The bitmap is cached in Opengl: clear the cache, because
|
||||||
// the cache data is invalid
|
// the cache data is invalid
|
||||||
GetCanvas()->GetGAL()->ClearCache();
|
GetCanvas()->GetGAL()->ClearCache();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCH_SHEET_T:
|
case SCH_SHEET_T:
|
||||||
|
@ -1301,6 +1305,18 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SCH_BUS_BUS_ENTRY_T:
|
||||||
|
case SCH_BUS_WIRE_ENTRY_T:
|
||||||
|
m_canvas->MoveCursorToCrossHair();
|
||||||
|
SaveCopyInUndoList( item, UR_CHANGED );
|
||||||
|
|
||||||
|
if( aEvent.GetId() == ID_SCH_MIRROR_X )
|
||||||
|
item->MirrorX( m_canvas->GetParent()->GetCrossHairPosition().y );
|
||||||
|
else if( aEvent.GetId() == ID_SCH_MIRROR_Y )
|
||||||
|
item->MirrorY( m_canvas->GetParent()->GetCrossHairPosition().x );
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// This object cannot be oriented.
|
// This object cannot be oriented.
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in New Issue