Browse Source

Link copper layer color swatches in 3D viewer

pull/18/head
Ian McInerney 5 months ago
parent
commit
33a4d6ea6f
  1. 17
      3d-viewer/dialogs/appearance_controls_3D.cpp

17
3d-viewer/dialogs/appearance_controls_3D.cpp

@ -495,10 +495,27 @@ void APPEARANCE_CONTROLS_3D::onColorSwatchChanged( COLOR_SWATCH* aSwatch )
colors[ layer ] = newColor;
// The internals of the 3D viewer only supports a single color for copper, which must
// be applied to all copper layers.
COLOR_SWATCH* otherSwatch = nullptr;
if( layer == LAYER_3D_COPPER_TOP )
{
colors[ LAYER_3D_COPPER_BOTTOM ] = newColor;
otherSwatch = m_layerSettingsMap[LAYER_3D_COPPER_BOTTOM]->m_Ctl_color;
}
else if( layer == LAYER_3D_COPPER_BOTTOM )
{
colors[ LAYER_3D_COPPER_TOP ] = newColor;
otherSwatch = m_layerSettingsMap[LAYER_3D_COPPER_TOP]->m_Ctl_color;
}
if( otherSwatch )
{
// Don't send an event, because that will cause an event loop
otherSwatch->SetSwatchColor( newColor, false );
}
m_frame->GetAdapter().SetLayerColors( colors );

Loading…
Cancel
Save