Fix optimization to not fetch all possible endpoints for non-connectable.
This commit is contained in:
parent
fad385785d
commit
7901d705ba
|
@ -589,6 +589,8 @@ void SCH_LINE::GetEndPoints( std::vector <DANGLING_END_ITEM>& aItemList )
|
||||||
|
|
||||||
bool SCH_LINE::UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList,
|
bool SCH_LINE::UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList,
|
||||||
const SCH_SHEET_PATH* aPath )
|
const SCH_SHEET_PATH* aPath )
|
||||||
|
{
|
||||||
|
if( IsConnectable() )
|
||||||
{
|
{
|
||||||
bool previousStartState = m_startIsDangling;
|
bool previousStartState = m_startIsDangling;
|
||||||
bool previousEndState = m_endIsDangling;
|
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)
|
// has changed or not (and returning true will result in extra work)
|
||||||
if( IsBus() )
|
if( IsBus() )
|
||||||
return false;
|
return false;
|
||||||
else
|
|
||||||
return previousStartState != m_startIsDangling || previousEndState != m_endIsDangling;
|
return previousStartState != m_startIsDangling || previousEndState != m_endIsDangling;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SCH_LINE::IsConnectable() const
|
bool SCH_LINE::IsConnectable() const
|
||||||
{
|
{
|
||||||
|
|
|
@ -981,6 +981,8 @@ void SCH_SCREEN::TestDanglingEnds( const SCH_SHEET_PATH* aPath,
|
||||||
std::vector<DANGLING_END_ITEM> endPoints;
|
std::vector<DANGLING_END_ITEM> endPoints;
|
||||||
|
|
||||||
for( SCH_ITEM* item : Items() )
|
for( SCH_ITEM* item : Items() )
|
||||||
|
{
|
||||||
|
if( item->IsConnectable() )
|
||||||
{
|
{
|
||||||
endPoints.clear();
|
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,
|
SCH_LINE* SCH_SCREEN::GetLine( const wxPoint& aPosition, int aAccuracy, int aLayer,
|
||||||
|
|
Loading…
Reference in New Issue