diff --git a/eeschema/lib_symbol.cpp b/eeschema/lib_symbol.cpp index a82785c1bd..f5a067c7a8 100644 --- a/eeschema/lib_symbol.cpp +++ b/eeschema/lib_symbol.cpp @@ -601,7 +601,19 @@ void LIB_SYMBOL::Print( const SCH_RENDER_SETTINGS* aSettings, int aUnit, int aBo if( shape.GetFillMode() == FILL_T::FILLED_WITH_BG_BODYCOLOR ) aForceNoFill = true; + // Ensure the color of shape is from LAYER_DEVICE if not specified. + COLOR4D init_color = shape.GetStroke().GetColor(); + STROKE_PARAMS prms = shape.GetStroke(); + + if( init_color == COLOR4D::UNSPECIFIED ) + { + COLOR4D color = aSettings->GetLayerColor( LAYER_DEVICE ); + prms.SetColor( color ); + shape.SetStroke( prms ); + } shape.Print( aSettings, aUnit, aBodyStyle, aOffset, aForceNoFill, aDimmed ); + prms.SetColor( init_color ); + shape.SetStroke( prms ); } else { diff --git a/eeschema/sch_shape.cpp b/eeschema/sch_shape.cpp index caa42132a3..d52f893050 100644 --- a/eeschema/sch_shape.cpp +++ b/eeschema/sch_shape.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2004-2022 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2004-2024 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -393,7 +393,7 @@ void SCH_SHAPE::Print( const SCH_RENDER_SETTINGS* aSettings, int aUnit, int aBod EDA_ANGLE arc_angle = ( t1 - t2 ).Normalize180(); bool transformed2 = ( arc_angle > ANGLE_0 ) && ( arc_angle < ANGLE_180 ); - if( transformed == transformed2 ) + if( transformed != transformed2 ) std::swap( start, end ); } }