Minor code cleanup.
This commit is contained in:
parent
d5fd09249b
commit
b28332c5f1
|
@ -1332,18 +1332,10 @@ void SCH_PAINTER::draw( SCH_TEXT *aText, int aLayer )
|
|||
|
||||
switch( aText->GetLabelSpinStyle() )
|
||||
{
|
||||
case LABEL_SPIN_STYLE::LEFT:
|
||||
text_offset.x += getShadowWidth() / 2;
|
||||
break;
|
||||
case LABEL_SPIN_STYLE::UP:
|
||||
text_offset.y += getShadowWidth() / 2;
|
||||
break;
|
||||
case LABEL_SPIN_STYLE::RIGHT:
|
||||
text_offset.x -= getShadowWidth() / 2;
|
||||
break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM:
|
||||
text_offset.y -= getShadowWidth() / 2;
|
||||
break;
|
||||
case LABEL_SPIN_STYLE::LEFT: text_offset.x += getShadowWidth() / 2; break;
|
||||
case LABEL_SPIN_STYLE::UP: text_offset.y += getShadowWidth() / 2; break;
|
||||
case LABEL_SPIN_STYLE::RIGHT: text_offset.x -= getShadowWidth() / 2; break;
|
||||
case LABEL_SPIN_STYLE::BOTTOM: text_offset.y -= getShadowWidth() / 2; break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1353,8 +1345,10 @@ void SCH_PAINTER::draw( SCH_TEXT *aText, int aLayer )
|
|||
}
|
||||
|
||||
if( aText->IsDangling() )
|
||||
{
|
||||
drawDanglingSymbol( aText->GetTextPos(), Mils2iu( DANGLING_SYMBOL_SIZE / 2 ),
|
||||
drawingShadows );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -612,15 +612,15 @@ int SCH_SHEET::ComponentCount() const
|
|||
|
||||
if( m_screen )
|
||||
{
|
||||
for( auto aItem : m_screen->Items().OfType( SCH_COMPONENT_T ) )
|
||||
for( SCH_ITEM* aItem : m_screen->Items().OfType( SCH_COMPONENT_T ) )
|
||||
{
|
||||
SCH_COMPONENT* Cmp = (SCH_COMPONENT*) aItem;
|
||||
SCH_COMPONENT* comp = (SCH_COMPONENT*) aItem;
|
||||
|
||||
if( Cmp->GetField( VALUE )->GetText().GetChar( 0 ) != '#' )
|
||||
if( comp->GetField( VALUE )->GetText().GetChar( 0 ) != '#' )
|
||||
n++;
|
||||
}
|
||||
|
||||
for( auto aItem : m_screen->Items().OfType( SCH_SHEET_T ) )
|
||||
for( SCH_ITEM* aItem : m_screen->Items().OfType( SCH_SHEET_T ) )
|
||||
n += static_cast<const SCH_SHEET*>( aItem )->ComponentCount();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue