bool SCH_SCREEN::TestDanglingEnds() { SCH_ITEM* item; std::vector< DANGLING_END_ITEM > endPoints; bool hasStateChanged = false; for( item = m_drawList.begin(); item; item = item->Next() ) item->GetEndPoints( endPoints ); for( item = m_drawList.begin(); item; item = item->Next() ) { if( item->IsDanglingStateChanged( endPoints ) ) { hasStateChanged = true; } } return hasStateChanged; }
bool SCH_SCREEN::TestDanglingEnds( EDA_DRAW_PANEL* aCanvas, wxDC* aDC ) { SCH_ITEM* item; std::vector< DANGLING_END_ITEM > endPoints; bool hasDanglingEnds = false; for( item = m_drawList.begin(); item; item = item->Next() ) item->GetEndPoints( endPoints ); for( item = m_drawList.begin(); item; item = item->Next() ) { if( item->IsDanglingStateChanged( endPoints ) && ( aCanvas ) && ( aDC ) ) { item->Draw( aCanvas, aDC, wxPoint( 0, 0 ), g_XorMode ); item->Draw( aCanvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); } if( item->IsDangling() ) hasDanglingEnds = true; } return hasDanglingEnds; }