mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Don't add default netclass for missing PCB or schematic colors
We don't allow these to be set on the default netclass, so we don't need to resolve it if they are missing in a custom netclass. The renderer will use the colors specified in the application color scheme.
This commit is contained in:
parent
a6f00a395c
commit
68196ad3f3
common
@ -328,6 +328,7 @@ void PANEL_SETUP_NETCLASSES::loadNetclasses()
|
||||
m_netclassGrid->SetReadOnly( aRow, GRID_NAME );
|
||||
m_netclassGrid->SetReadOnly( aRow, GRID_PCB_COLOR );
|
||||
m_netclassGrid->SetReadOnly( aRow, GRID_SCHEMATIC_COLOR );
|
||||
m_netclassGrid->SetReadOnly( aRow, GRID_LINESTYLE );
|
||||
}
|
||||
|
||||
setNetclassRowNullableEditors( aRow, nc->IsDefault() );
|
||||
|
@ -995,37 +995,6 @@ bool NET_SETTINGS::addMissingDefaults( NETCLASS* nc ) const
|
||||
nc->SetBusWidthParent( m_defaultNetClass.get() );
|
||||
}
|
||||
|
||||
if( !nc->HasLineStyle() )
|
||||
{
|
||||
addedDefault = true;
|
||||
nc->SetLineStyle( m_defaultNetClass->GetLineStyle() );
|
||||
nc->SetLineStyleParent( m_defaultNetClass.get() );
|
||||
}
|
||||
|
||||
COLOR4D pcbColor = nc->GetPcbColor();
|
||||
|
||||
if( pcbColor == COLOR4D::UNSPECIFIED )
|
||||
{
|
||||
if( m_defaultNetClass->GetPcbColor() != COLOR4D::UNSPECIFIED )
|
||||
{
|
||||
addedDefault = true;
|
||||
nc->SetPcbColor( m_defaultNetClass->GetPcbColor() );
|
||||
nc->SetPcbColorParent( m_defaultNetClass.get() );
|
||||
}
|
||||
}
|
||||
|
||||
COLOR4D schColor = nc->GetSchematicColor();
|
||||
|
||||
if( schColor == COLOR4D::UNSPECIFIED )
|
||||
{
|
||||
if( m_defaultNetClass->GetSchematicColor() != COLOR4D::UNSPECIFIED )
|
||||
{
|
||||
addedDefault = true;
|
||||
nc->SetSchematicColor( m_defaultNetClass->GetSchematicColor() );
|
||||
nc->SetSchematicColorParent( m_defaultNetClass.get() );
|
||||
}
|
||||
}
|
||||
|
||||
return addedDefault;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user