diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 9a510892df..ce94aa879e 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -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 ); + } } diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 5dd69ea845..8e9ed997dd 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -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( aItem )->ComponentCount(); }