Import graphics is a one-shot, not a tool.
Fixes: lp:1841975 * https://bugs.launchpad.net/kicad/+bug/1841975
This commit is contained in:
parent
bc450853ae
commit
359cf384de
|
@ -769,8 +769,6 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
|
||||||
if( evt->IsCancelInteractive() || evt->IsActivate() )
|
if( evt->IsCancelInteractive() || evt->IsActivate() )
|
||||||
{
|
{
|
||||||
preview.FreeItems();
|
preview.FreeItems();
|
||||||
|
|
||||||
m_frame->PopTool( tool );
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if( evt->IsMotion() )
|
else if( evt->IsMotion() )
|
||||||
|
@ -816,7 +814,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
|
||||||
commit.Add( item );
|
commit.Add( item );
|
||||||
|
|
||||||
commit.Push( _( "Place a DXF_SVG drawing" ) );
|
commit.Push( _( "Place a DXF_SVG drawing" ) );
|
||||||
break;
|
break; // This is a one-shot command, not a tool
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
evt->SetPassEvent();
|
evt->SetPassEvent();
|
||||||
|
@ -824,6 +822,7 @@ int DRAWING_TOOL::PlaceImportedGraphics( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
preview.Clear();
|
preview.Clear();
|
||||||
m_view->Remove( &preview );
|
m_view->Remove( &preview );
|
||||||
|
m_frame->PopTool( tool );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue