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:
parent
17b3b8f30d
commit
8e812c012d
|
@ -644,8 +644,13 @@ int SCH_DRAWING_TOOL::StartWire( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
int SCH_DRAWING_TOOL::DrawWire( const TOOL_EVENT& aEvent )
|
int SCH_DRAWING_TOOL::DrawWire( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
m_frame->SetToolID( ID_WIRE_BUTT, wxCURSOR_PENCIL, _( "Add wire" ) );
|
if( m_frame->GetToolId() == ID_WIRE_BUTT )
|
||||||
return doDrawSegments( LAYER_WIRE, nullptr );
|
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 )
|
int SCH_DRAWING_TOOL::DrawBus( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
m_frame->SetToolID( ID_BUS_BUTT, wxCURSOR_PENCIL, _( "Add bus" ) );
|
if( m_frame->GetToolId() == ID_BUS_BUTT )
|
||||||
return doDrawSegments( LAYER_BUS, nullptr );
|
StartBus( aEvent );
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_frame->SetToolID( ID_BUS_BUTT, wxCURSOR_PENCIL, _( "Add bus" ) );
|
||||||
|
return doDrawSegments( LAYER_BUS, nullptr );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue