From ec53ed6a37335f4db8e8e16d9f82a9b49546dd2b Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 3 Sep 2023 13:59:22 +0100 Subject: [PATCH] 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 624203f2e13794bf0c9f9b85b06dbab9f8a1cd5b) --- pcbnew/tools/edit_tool.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index a5351a40d3..bb8744f3fb 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -339,10 +339,22 @@ bool EDIT_TOOL::isRouterActive() const int EDIT_TOOL::Drag( const TOOL_EVENT& aEvent ) { if( !m_toolMgr->GetTool() ) + { + wxBell(); return false; // don't drag when no router tool (i.e. fp editor) + } if( m_toolMgr->GetTool()->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;