Don't assert when getting line width for sheets
This commit is contained in:
parent
5250215d97
commit
b0ebc476d2
|
@ -313,22 +313,19 @@ float SCH_PAINTER::getLineWidth( const LIB_ITEM* aItem, bool aDrawingShadows )
|
||||||
|
|
||||||
float SCH_PAINTER::getLineWidth( const SCH_ITEM* aItem, bool aDrawingShadows )
|
float SCH_PAINTER::getLineWidth( const SCH_ITEM* aItem, bool aDrawingShadows )
|
||||||
{
|
{
|
||||||
wxCHECK( aItem && aItem->Type() == SCH_LINE_T,
|
wxCHECK( aItem, static_cast<float>( m_schSettings.m_DefaultWireThickness ) );
|
||||||
static_cast<float>( m_schSettings.m_DefaultWireThickness ) );
|
|
||||||
|
|
||||||
float width;
|
float width;
|
||||||
const SCH_LINE* line = dynamic_cast<const SCH_LINE*>( aItem );
|
const SCH_LINE* line = dynamic_cast<const SCH_LINE*>( aItem );
|
||||||
|
|
||||||
wxCHECK( line, static_cast<float>( m_schSettings.m_DefaultWireThickness ) );
|
if( line && aItem->GetLayer() == LAYER_WIRE )
|
||||||
|
|
||||||
if( aItem->GetLayer() == LAYER_WIRE )
|
|
||||||
{
|
{
|
||||||
if( line->GetLineSize() != 0 )
|
if( line->GetLineSize() != 0 )
|
||||||
width = (float) line->GetLineSize();
|
width = (float) line->GetLineSize();
|
||||||
else
|
else
|
||||||
width = (float) m_schSettings.m_DefaultWireThickness;
|
width = (float) m_schSettings.m_DefaultWireThickness;
|
||||||
}
|
}
|
||||||
else if( aItem->GetLayer() == LAYER_BUS )
|
else if( line && aItem->GetLayer() == LAYER_BUS )
|
||||||
{
|
{
|
||||||
if( line->GetLineSize() != 0 )
|
if( line->GetLineSize() != 0 )
|
||||||
width = (float) line->GetLineSize();
|
width = (float) line->GetLineSize();
|
||||||
|
|
Loading…
Reference in New Issue