Pick up snapped item's line properties.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15192

(cherry picked from commit 89780d353a)
This commit is contained in:
Jeff Young 2023-07-15 20:21:54 +01:00
parent 63b0ef65e0
commit 9cf79ffb5a
1 changed files with 4 additions and 2 deletions

View File

@ -1034,8 +1034,10 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const TOOL_EVENT& aTool, int aType,
SCH_LINE* SCH_LINE_WIRE_BUS_TOOL::startSegments( int aType, const VECTOR2D& aPos, SCH_LINE* SCH_LINE_WIRE_BUS_TOOL::startSegments( int aType, const VECTOR2D& aPos,
SCH_LINE* aSegment ) SCH_LINE* aSegment )
{ {
// If a segment isn't provided to copy properties from, we need to create one if( !aSegment )
if( aSegment == nullptr ) aSegment = m_frame->GetScreen()->GetLine( aPos, 0, aType );
if( !aSegment )
{ {
switch( aType ) switch( aType )
{ {