Disable various combinations of router and editing commands.
They just confuse each other. Fixes https://gitlab.com/kicad/code/kicad/issues/5067
This commit is contained in:
parent
0f3d79245e
commit
59ba793096
|
@ -1483,6 +1483,27 @@ int ROUTER_TOOL::InlineDrag( const TOOL_EVENT& aEvent )
|
||||||
m_router->FixRoute( m_endSnapPoint, m_endItem );
|
m_router->FixRoute( m_endSnapPoint, m_endItem );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
else if( evt->Category() == TC_COMMAND )
|
||||||
|
{
|
||||||
|
// disallow many editing commands
|
||||||
|
if( evt->IsAction( &PCB_ACTIONS::rotateCw )
|
||||||
|
|| evt->IsAction( &PCB_ACTIONS::rotateCcw )
|
||||||
|
|| evt->IsAction( &PCB_ACTIONS::flip )
|
||||||
|
|| evt->IsAction( &PCB_ACTIONS::mirror )
|
||||||
|
|| evt->IsAction( &ACTIONS::cut )
|
||||||
|
|| evt->IsAction( &ACTIONS::copy )
|
||||||
|
|| evt->IsAction( &ACTIONS::paste )
|
||||||
|
|| evt->IsAction( &ACTIONS::pasteSpecial )
|
||||||
|
|| evt->IsAction( &ACTIONS::duplicate )
|
||||||
|
|| evt->IsAction( &PCB_ACTIONS::duplicateIncrement )
|
||||||
|
|| evt->IsAction( &PCB_ACTIONS::move )
|
||||||
|
|| evt->IsAction( &PCB_ACTIONS::moveWithReference )
|
||||||
|
|| evt->IsAction( &PCB_ACTIONS::moveExact ) )
|
||||||
|
{
|
||||||
|
wxBell();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if( module )
|
if( module )
|
||||||
|
|
|
@ -249,6 +249,13 @@ bool EDIT_TOOL::invokeInlineRouter( int aDragMode )
|
||||||
if( !theRouter )
|
if( !theRouter )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// don't allow switch from moving to dragging
|
||||||
|
if( m_dragging )
|
||||||
|
{
|
||||||
|
wxBell();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// make sure we don't accidentally invoke inline routing mode while the router is already active!
|
// make sure we don't accidentally invoke inline routing mode while the router is already active!
|
||||||
if( theRouter->IsToolActive() )
|
if( theRouter->IsToolActive() )
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -114,9 +114,6 @@ public:
|
||||||
/// Activation of the exact move tool
|
/// Activation of the exact move tool
|
||||||
static TOOL_ACTION moveExact;
|
static TOOL_ACTION moveExact;
|
||||||
|
|
||||||
/// Activation of the duplication tool
|
|
||||||
static TOOL_ACTION duplicate;
|
|
||||||
|
|
||||||
/// Activation of the duplication tool with incrementing (e.g. pad number)
|
/// Activation of the duplication tool with incrementing (e.g. pad number)
|
||||||
static TOOL_ACTION duplicateIncrement;
|
static TOOL_ACTION duplicateIncrement;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue