Prevent deletion while actively routing
Fixes: lp:1766280 * https://bugs.launchpad.net/kicad/+bug/1766280
This commit is contained in:
parent
345f7d0732
commit
d0ffff3b88
|
@ -846,6 +846,13 @@ int EDIT_TOOL::Flip( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
|
int EDIT_TOOL::Remove( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
|
ROUTER_TOOL* routerTool = static_cast<ROUTER_TOOL*>
|
||||||
|
( m_toolMgr->FindTool( "pcbnew.InteractiveRouter" ) );
|
||||||
|
|
||||||
|
// Do not delete items while actively routing.
|
||||||
|
if( routerTool && routerTool->Router() && routerTool->Router()->RoutingInProgress() )
|
||||||
|
return 0;
|
||||||
|
|
||||||
// get a copy instead of reference (as we're going to clear the selectio before removing items)
|
// get a copy instead of reference (as we're going to clear the selectio before removing items)
|
||||||
auto selection = m_selectionTool->RequestSelection( SELECTION_DELETABLE | SELECTION_SANITIZE_PADS );
|
auto selection = m_selectionTool->RequestSelection( SELECTION_DELETABLE | SELECTION_SANITIZE_PADS );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue