Use schematic default line width for GetPenWidth on zero-size lines

This commit is contained in:
Jon Evans 2020-05-19 23:39:15 -04:00
parent fbc42a8cb5
commit 5248f2952e
1 changed files with 4 additions and 0 deletions

View File

@ -41,6 +41,7 @@
#include <settings/color_settings.h> #include <settings/color_settings.h>
#include <netlist_object.h> #include <netlist_object.h>
#include <sch_view.h> #include <sch_view.h>
#include <schematic.h>
static wxPenStyle getwxPenStyle( PLOT_DASH_TYPE aType ) static wxPenStyle getwxPenStyle( PLOT_DASH_TYPE aType )
@ -292,6 +293,9 @@ void SCH_LINE::SetLineWidth( const int aSize )
int SCH_LINE::GetPenWidth() const int SCH_LINE::GetPenWidth() const
{ {
if( m_size == 0 && Schematic() )
return std::max( Schematic()->Settings().m_DefaultLineWidth, 1 );
return std::max( m_size, 1 ); return std::max( m_size, 1 );
} }