Handle double-click in dimension drawing tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/11815
This commit is contained in:
parent
631eecd7d6
commit
d40664d171
|
@ -924,7 +924,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
m_menu.ShowContextMenu( selection() );
|
m_menu.ShowContextMenu( selection() );
|
||||||
}
|
}
|
||||||
else if( evt->IsClick( BUT_LEFT ) )
|
else if( evt->IsClick( BUT_LEFT ) || evt->IsDblClick( BUT_LEFT ) )
|
||||||
{
|
{
|
||||||
switch( step )
|
switch( step )
|
||||||
{
|
{
|
||||||
|
@ -1047,12 +1047,16 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( ++step == FINISHED )
|
if( ++step >= FINISHED )
|
||||||
{
|
{
|
||||||
step = SET_ORIGIN;
|
step = SET_ORIGIN;
|
||||||
m_controls->SetAutoPan( false );
|
m_controls->SetAutoPan( false );
|
||||||
m_controls->CaptureCursor( false );
|
m_controls->CaptureCursor( false );
|
||||||
}
|
}
|
||||||
|
else if( evt->IsDblClick( BUT_LEFT ) )
|
||||||
|
{
|
||||||
|
m_toolMgr->RunAction( PCB_ACTIONS::cursorClick, false );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if( evt->IsMotion() )
|
else if( evt->IsMotion() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue