See if copying netclasses is responsible for KICAD-V6Z (and others).

This commit is contained in:
Jeff Young 2025-08-02 20:55:10 +01:00
parent 8c85cd43f3
commit a75fd2bb23
2 changed files with 5 additions and 4 deletions

View File

@ -56,6 +56,9 @@ public:
~NETCLASS(){};
NETCLASS( const NETCLASS& ) = delete;
NETCLASS& operator=( const NETCLASS& ) = delete;
bool operator==( const NETCLASS& other ) const;
wxString GetClass() const

View File

@ -4051,15 +4051,13 @@ NETINFO_ITEM* CADSTAR_PCB_ARCHIVE_LOADER::getKiCadNet( const NET_ID& aCadstarNet
netClassName += wxT( " | Spacing class: " ) + sp.Name;
}
netclass.reset( new NETCLASS( *netSettings->GetDefaultNetclass() ) );
netclass->SetName( netClassName );
netclass.reset( new NETCLASS( netClassName ) );
netSettings->SetNetclass( netClassName, netclass );
netclass->SetTrackWidth( getKiCadLength( rc.OptimalWidth ) );
m_netClassMap.insert( { key, netclass } );
}
m_board->GetDesignSettings().m_NetSettings->SetNetclassPatternAssignment(
newName, netclass->GetName() );
m_board->GetDesignSettings().m_NetSettings->SetNetclassPatternAssignment( newName, netclass->GetName() );
netInfo->SetNetClass( netclass );
m_board->Add( netInfo, ADD_MODE::APPEND );