Fix bug with re-enting selection main loop.

This commit is contained in:
Jeff Young 2019-05-10 19:55:48 +01:00
parent c1539ae014
commit 86d1592777
3 changed files with 8 additions and 1 deletions

View File

@ -34,7 +34,7 @@ OPT<TOOL_EVENT> EE_ACTIONS::TranslateLegacyId( int aId )
switch( aId )
{
case ID_NO_TOOL_SELECTED:
return EE_ACTIONS::selectionActivate.MakeEvent();
return EE_ACTIONS::selectionTool.MakeEvent();
case ID_CANCEL_CURRENT_COMMAND:
return ACTIONS::cancelInteractive.MakeEvent();

View File

@ -50,6 +50,9 @@
TOOL_ACTION EE_ACTIONS::selectionActivate( "eeschema.InteractiveSelection",
AS_GLOBAL, 0, "", "", NULL, AF_ACTIVATE ); // No description, not shown anywhere
TOOL_ACTION EE_ACTIONS::selectionTool( "eeschema.InteractiveSelection.selectionTool",
AS_GLOBAL, 0, "", "", NULL, AF_ACTIVATE ); // No description, not shown anywhere
TOOL_ACTION EE_ACTIONS::selectNode( "eeschema.InteractiveSelection.SelectNode",
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_SELECT_NODE ),
_( "Select Node" ), _( "Select a connection item under the cursor" ), nullptr );

View File

@ -297,6 +297,10 @@ int LIB_DRAWING_TOOLS::doTwoClickPlace( KICAD_T aType )
int LIB_DRAWING_TOOLS::DrawShape( const TOOL_EVENT& aEvent )
{
// We might be running as the same shape in another co-routine. Make sure that one
// gets whacked.
m_toolMgr->DeactivateTool();
if( aEvent.IsAction( &EE_ACTIONS::drawSymbolArc ) )
m_frame->SetToolID( ID_LIBEDIT_BODY_ARC_BUTT, wxCURSOR_PENCIL, _( "Draw Arc" ) );
else if( aEvent.IsAction( &EE_ACTIONS::drawSymbolCircle ) )