Fixed crash when redrawing ratsnest after swapping pad net assignments
This commit is contained in:
parent
0f5ab1bc87
commit
c229063d9e
|
@ -263,6 +263,7 @@ void BOARD_COMMIT::Push( const wxString& aMessage, bool aCreateUndoEntry )
|
||||||
}
|
}
|
||||||
|
|
||||||
view->Update ( boardItem );
|
view->Update ( boardItem );
|
||||||
|
connectivity->MarkItemNetAsDirty( static_cast<BOARD_ITEM*>( ent.m_copy ) );
|
||||||
connectivity->Update( boardItem );
|
connectivity->Update( boardItem );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -574,3 +574,18 @@ RN_NET* CONNECTIVITY_DATA::GetRatsnestForNet( int aNet )
|
||||||
}
|
}
|
||||||
return m_nets[ aNet ];
|
return m_nets[ aNet ];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CONNECTIVITY_DATA::MarkItemNetAsDirty( BOARD_ITEM *aItem )
|
||||||
|
{
|
||||||
|
if (aItem->Type() == PCB_MODULE_T)
|
||||||
|
{
|
||||||
|
for ( auto pad : static_cast<MODULE*>( aItem )->Pads() )
|
||||||
|
{
|
||||||
|
m_connAlgo->MarkNetAsDirty( pad->GetNetCode() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (aItem->IsConnected() )
|
||||||
|
{
|
||||||
|
m_connAlgo->MarkNetAsDirty( static_cast<BOARD_CONNECTED_ITEM*>( aItem )->GetNetCode() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -210,6 +210,8 @@ public:
|
||||||
return m_connAlgo;
|
return m_connAlgo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MarkItemNetAsDirty( BOARD_ITEM* aItem );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void updateRatsnest();
|
void updateRatsnest();
|
||||||
|
|
Loading…
Reference in New Issue