From 89780d353acb8ea44d5b61c2ddeb112b25e82dc1 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 15 Jul 2023 20:21:54 +0100 Subject: [PATCH] Pick up snapped item's line properties. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15192 --- eeschema/tools/sch_line_wire_bus_tool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eeschema/tools/sch_line_wire_bus_tool.cpp b/eeschema/tools/sch_line_wire_bus_tool.cpp index 0310b8267d..fd36734b5b 100644 --- a/eeschema/tools/sch_line_wire_bus_tool.cpp +++ b/eeschema/tools/sch_line_wire_bus_tool.cpp @@ -1029,8 +1029,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* aSegment ) { - // If a segment isn't provided to copy properties from, we need to create one - if( aSegment == nullptr ) + if( !aSegment ) + aSegment = m_frame->GetScreen()->GetLine( aPos, 0, aType ); + + if( !aSegment ) { switch( aType ) {