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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15312

(cherry picked from commit 624203f2e1)
This commit is contained in:
Jeff Young 2023-09-03 13:59:22 +01:00
parent 242413a334
commit ec53ed6a37
1 changed files with 12 additions and 0 deletions

View File

@ -339,10 +339,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;