Don't start a router drag when already in an EDIT_TOOL drag or move.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15312
This commit is contained in:
Jeff Young 2023-09-03 13:59:22 +01:00
parent a8e18e2d8c
commit 624203f2e1
1 changed files with 12 additions and 0 deletions

View File

@ -379,10 +379,22 @@ bool EDIT_TOOL::isRouterActive() const
int EDIT_TOOL::Drag( const TOOL_EVENT& aEvent )
{
if( !m_toolMgr->GetTool<ROUTER_TOOL>() )
{
wxBell();
return false; // don't drag when no router tool (i.e. fp editor)
}
if( m_toolMgr->GetTool<ROUTER_TOOL>()->IsToolActive() )
{
wxBell();
return false; // don't drag when router is already active
}
if( m_dragging )
{
wxBell();
return false; // don't do a router drag when already in an EDIT_TOOL drag
}
int mode = PNS::DM_ANY;