Browse Source

Fix optimization to not fetch all possible endpoints for non-connectable.

6.0.7
Jeff Young 4 years ago
parent
commit
7901d705ba
  1. 7
      eeschema/sch_line.cpp
  2. 3
      eeschema/sch_screen.cpp

7
eeschema/sch_line.cpp

@ -589,6 +589,8 @@ void SCH_LINE::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList )
bool SCH_LINE::UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList,
const SCH_SHEET_PATH* aPath )
{
if( IsConnectable() )
{
bool previousStartState = m_startIsDangling;
bool previousEndState = m_endIsDangling;
@ -618,10 +620,13 @@ bool SCH_LINE::UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList,
// has changed or not (and returning true will result in extra work)
if( IsBus() )
return false;
else
return previousStartState != m_startIsDangling || previousEndState != m_endIsDangling;
}
return false;
}
bool SCH_LINE::IsConnectable() const
{

3
eeschema/sch_screen.cpp

@ -981,6 +981,8 @@ void SCH_SCREEN::TestDanglingEnds( const SCH_SHEET_PATH* aPath,
std::vector<DANGLING_END_ITEM> endPoints;
for( SCH_ITEM* item : Items() )
{
if( item->IsConnectable() )
{
endPoints.clear();
@ -994,6 +996,7 @@ void SCH_SCREEN::TestDanglingEnds( const SCH_SHEET_PATH* aPath,
}
}
}
}
SCH_LINE* SCH_SCREEN::GetLine( const wxPoint& aPosition, int aAccuracy, int aLayer,

Loading…
Cancel
Save