Fix bug with re-enting selection main loop.
This commit is contained in:
parent
c1539ae014
commit
86d1592777
|
@ -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();
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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 ) )
|
||||
|
|
Loading…
Reference in New Issue