Handle double-click in dimension drawing tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/11815
(cherry picked from commit d40664d171
)
This commit is contained in:
parent
52157acbfe
commit
0bc97b7952
|
@ -857,7 +857,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 )
|
||||||
{
|
{
|
||||||
|
@ -987,12 +987,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