pcbnew: don't rebuild dynamic ratsnest when moving items without a net (e.g. board outlines)
Fixes: lp:1778321 * https://bugs.launchpad.net/kicad/+bug/1778321
This commit is contained in:
parent
847f4f50b1
commit
01c2d93a81
|
@ -224,13 +224,44 @@ void CONNECTIVITY_DATA::FindIsolatedCopperIslands( std::vector<CN_ZONE_ISOLATED_
|
|||
m_connAlgo->FindIsolatedCopperIslands( aZones );
|
||||
}
|
||||
|
||||
int CONNECTIVITY_DATA::countRelevantItems( const std::vector<BOARD_ITEM*>& aItems )
|
||||
{
|
||||
int n = 0;
|
||||
|
||||
for( const auto item : aItems )
|
||||
{
|
||||
switch( item->Type() )
|
||||
{
|
||||
case PCB_TRACE_T:
|
||||
case PCB_PAD_T:
|
||||
case PCB_ZONE_AREA_T:
|
||||
case PCB_MODULE_T:
|
||||
case PCB_VIA_T:
|
||||
n++;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
||||
void CONNECTIVITY_DATA::ComputeDynamicRatsnest( const std::vector<BOARD_ITEM*>& aItems )
|
||||
{
|
||||
if( countRelevantItems( aItems ) == 0 )
|
||||
{
|
||||
m_dynamicRatsnest.clear();
|
||||
return ;
|
||||
}
|
||||
|
||||
m_dynamicConnectivity.reset( new CONNECTIVITY_DATA );
|
||||
m_dynamicConnectivity->Build( aItems );
|
||||
|
||||
m_dynamicRatsnest.clear();
|
||||
|
||||
|
||||
BlockRatsnestItems( aItems );
|
||||
|
||||
for( unsigned int nc = 1; nc < m_dynamicConnectivity->m_nets.size(); nc++ )
|
||||
|
|
|
@ -236,7 +236,8 @@ public:
|
|||
void SetProgressReporter( PROGRESS_REPORTER* aReporter );
|
||||
|
||||
private:
|
||||
|
||||
|
||||
int countRelevantItems( const std::vector<BOARD_ITEM*>& aItems );
|
||||
void updateRatsnest();
|
||||
void addRatsnestCluster( const std::shared_ptr<CN_CLUSTER>& aCluster );
|
||||
|
||||
|
|
Loading…
Reference in New Issue