Handle double-click in dimension drawing tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/11815
This commit is contained in:
Jeff Young 2022-06-15 18:06:34 +01:00
parent 631eecd7d6
commit d40664d171
1 changed files with 6 additions and 2 deletions

View File

@ -924,7 +924,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
{
m_menu.ShowContextMenu( selection() );
}
else if( evt->IsClick( BUT_LEFT ) )
else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) )
{
switch( step )
{
@ -1047,12 +1047,16 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
break;
}
if( ++step == FINISHED )
if( ++step >= FINISHED )
{
step = SET_ORIGIN;
m_controls->SetAutoPan( false );
m_controls->CaptureCursor( false );
}
else if( evt->IsDblClick( BUT_LEFT ) )
{
m_toolMgr->RunAction( PCB_ACTIONS::cursorClick, false );
}
}
else if( evt->IsMotion() )
{