Intercept rotate command when drawing wires.

If unfolding from bus rotate the label; otherwise beep.

Fixes https://gitlab.com/kicad/code/kicad/issues/9178
This commit is contained in:
Jeff Young 2021-09-17 21:55:21 +01:00
parent 7b07b1650c
commit 4b3490a2b9
1 changed files with 12 additions and 0 deletions

View File

@ -757,6 +757,18 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType,
segment = doUnfoldBus( net, contextMenuPos ); segment = doUnfoldBus( net, contextMenuPos );
} }
} }
else if( evt->IsAction( &EE_ACTIONS::rotateCW ) || evt->IsAction( &EE_ACTIONS::rotateCCW ) )
{
if( m_busUnfold.in_progress )
{
m_busUnfold.label->Rotate90( evt->IsAction( &EE_ACTIONS::rotateCW ) );
m_toolMgr->RunAction( ACTIONS::refreshPreview );
}
else
{
wxBell();
}
}
else if( evt->IsAction( &ACTIONS::doDelete ) && ( segment || m_busUnfold.in_progress ) ) else if( evt->IsAction( &ACTIONS::doDelete ) && ( segment || m_busUnfold.in_progress ) )
{ {
cleanup(); cleanup();