diff --git a/eeschema/sch_bus_entry.cpp b/eeschema/sch_bus_entry.cpp index b9134f468b..a94a9a8bfa 100644 --- a/eeschema/sch_bus_entry.cpp +++ b/eeschema/sch_bus_entry.cpp @@ -150,29 +150,35 @@ PLOT_DASH_TYPE SCH_BUS_ENTRY_BASE::GetStrokeStyle() const int SCH_BUS_WIRE_ENTRY::GetPenWidth() const { + if( m_stroke.GetWidth() > 0 ) + return m_stroke.GetWidth(); + NETCLASSPTR netclass = NetClass(); if( netclass ) return netclass->GetWireWidth(); - if( m_stroke.GetWidth() == 0 && Schematic() ) + if( Schematic() ) return std::max( Schematic()->Settings().m_DefaultWireThickness, 1 ); - return ( m_stroke.GetWidth() == 0 ) ? 1 : m_stroke.GetWidth(); + return DEFAULT_WIRE_THICKNESS; } int SCH_BUS_BUS_ENTRY::GetPenWidth() const { + if( m_stroke.GetWidth() > 0 ) + return m_stroke.GetWidth(); + NETCLASSPTR netclass = NetClass(); if( netclass ) return netclass->GetBusWidth(); - if( m_stroke.GetWidth() == 0 && Schematic() ) + if( Schematic() ) return std::max( Schematic()->Settings().m_DefaultBusThickness, 1 ); - return ( m_stroke.GetWidth() == 0 ) ? 1 : m_stroke.GetWidth(); + return DEFAULT_BUS_THICKNESS; } diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 412fd96e53..7d1cb29b3c 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -1773,6 +1773,7 @@ void SCH_PAINTER::draw( const SCH_BUS_ENTRY_BASE *aEntry, int aLayer ) line.SetStartPoint( aEntry->GetPosition() ); line.SetEndPoint( aEntry->GetEnd() ); line.SetStroke( aEntry->GetStroke() ); + line.SetLineWidth( getLineWidth( aEntry, drawingShadows ) ); COLOR4D color = getRenderColor( aEntry, LAYER_WIRE, drawingShadows );