pcbnew: Allow click+drag of tracks

This behavior existed in 5.0.x but did not properly exit the edit tool
in 5.1.  This removes stops the edit tool when we begin dragging a track
using the interactive router.

Fixes: lp:1820312
* https://bugs.launchpad.net/kicad/+bug/1820312

(cherry picked from commit c8118e3ce4)
This commit is contained in:
Seth Hillbrand 2019-04-07 20:57:10 -07:00
parent 4379480d4b
commit f5a2eb1ab0
1 changed files with 67 additions and 69 deletions

View File

@ -426,13 +426,12 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
} }
else if( !m_dragging ) // Prepare to start dragging else if( !m_dragging ) // Prepare to start dragging
{ {
bool invokedRouter = false;
if ( !evt->IsAction( &PCB_ACTIONS::move ) && isInteractiveDragEnabled() ) if ( !evt->IsAction( &PCB_ACTIONS::move ) && isInteractiveDragEnabled() )
invokedRouter = invokeInlineRouter( PNS::DM_ANY );
if( !invokedRouter )
{ {
if( invokeInlineRouter( PNS::DM_ANY ) )
break;
}
// deal with locked items (override lock or abort the operation) // deal with locked items (override lock or abort the operation)
SELECTION_LOCK_FLAGS lockFlags = m_selectionTool->CheckLock(); SELECTION_LOCK_FLAGS lockFlags = m_selectionTool->CheckLock();
@ -499,7 +498,6 @@ int EDIT_TOOL::Main( const TOOL_EVENT& aEvent )
controls->SetAutoPan( true ); controls->SetAutoPan( true );
m_dragging = true; m_dragging = true;
} }
}
m_toolMgr->RunAction( PCB_ACTIONS::selectionModified, false ); m_toolMgr->RunAction( PCB_ACTIONS::selectionModified, false );
m_toolMgr->RunAction( PCB_ACTIONS::updateLocalRatsnest, false ); m_toolMgr->RunAction( PCB_ACTIONS::updateLocalRatsnest, false );