Make sure pasted items get their netclass updated along with their net.
Fixes https://gitlab.com/kicad/code/kicad/issues/4974
This commit is contained in:
parent
1be39195ab
commit
ba537209ab
|
@ -89,7 +89,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void SetNet( NETINFO_ITEM* aNetInfo )
|
void SetNet( NETINFO_ITEM* aNetInfo )
|
||||||
{
|
{
|
||||||
wxASSERT( aNetInfo->GetBoard() == GetBoard() || aNetInfo == NETINFO_LIST::OrphanedItem() );
|
|
||||||
m_netinfo = aNetInfo;
|
m_netinfo = aNetInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1866,7 +1866,7 @@ void BOARD::MapNets( const BOARD* aDestBoard )
|
||||||
NETINFO_ITEM* netInfo = aDestBoard->FindNet( item->GetNetname() );
|
NETINFO_ITEM* netInfo = aDestBoard->FindNet( item->GetNetname() );
|
||||||
|
|
||||||
if( netInfo )
|
if( netInfo )
|
||||||
item->SetNetCode( netInfo->GetNet() );
|
item->SetNet( netInfo );
|
||||||
else
|
else
|
||||||
item->SetNetCode( 0 );
|
item->SetNetCode( 0 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue