Second activation of wire or bus tool should start drawing.

Fixes: lp:1825871
* https://bugs.launchpad.net/kicad/+bug/1825871
This commit is contained in:
Jeff Young 2019-04-22 22:06:23 +01:00
parent 17b3b8f30d
commit 8e812c012d
1 changed files with 14 additions and 4 deletions

View File

@ -644,8 +644,13 @@ int SCH_DRAWING_TOOL::StartWire( const TOOL_EVENT& aEvent )
int SCH_DRAWING_TOOL::DrawWire( const TOOL_EVENT& aEvent )
{
m_frame->SetToolID( ID_WIRE_BUTT, wxCURSOR_PENCIL, _( "Add wire" ) );
return doDrawSegments( LAYER_WIRE, nullptr );
if( m_frame->GetToolId() == ID_WIRE_BUTT )
StartWire( aEvent );
else
{
m_frame->SetToolID( ID_WIRE_BUTT, wxCURSOR_PENCIL, _( "Add wire" ) );
return doDrawSegments( LAYER_WIRE, nullptr );
}
}
@ -661,8 +666,13 @@ int SCH_DRAWING_TOOL::StartBus( const TOOL_EVENT& aEvent )
int SCH_DRAWING_TOOL::DrawBus( const TOOL_EVENT& aEvent )
{
m_frame->SetToolID( ID_BUS_BUTT, wxCURSOR_PENCIL, _( "Add bus" ) );
return doDrawSegments( LAYER_BUS, nullptr );
if( m_frame->GetToolId() == ID_BUS_BUTT )
StartBus( aEvent );
else
{
m_frame->SetToolID( ID_BUS_BUTT, wxCURSOR_PENCIL, _( "Add bus" ) );
return doDrawSegments( LAYER_BUS, nullptr );
}
}