mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Make sure legacy colours always works.
Also, don't line wrap "Use PCB editor copper colors".
This commit is contained in:
parent
55946d40ec
commit
5f2a758160
@ -576,6 +576,23 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
||||
|
||||
m_boardAdapter.SetBoard( GetBoard() );
|
||||
|
||||
wxString legacyColorsPresetName = _( "legacy colors" );
|
||||
|
||||
if( LAYER_PRESET_3D* preset = cfg->FindPreset( legacyColorsPresetName ) )
|
||||
{
|
||||
// Something corrupts the legacy colours in 9.0, so just make sure that it always
|
||||
// has the correct values.
|
||||
*preset = { legacyColorsPresetName,
|
||||
GetAdapter().GetDefaultVisibleLayers(),
|
||||
GetAdapter().GetDefaultColors() };
|
||||
}
|
||||
else
|
||||
{
|
||||
cfg->m_LayerPresets.emplace_back( legacyColorsPresetName,
|
||||
GetAdapter().GetDefaultVisibleLayers(),
|
||||
GetAdapter().GetDefaultColors() );
|
||||
}
|
||||
|
||||
// When opening the 3D viewer, we use the OpenGL mode, never the ray tracing engine
|
||||
// because the ray tracing is very time consuming, and can be seen as not working
|
||||
// (freeze window) with large boards.
|
||||
@ -583,17 +600,7 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
||||
|
||||
if( cfg->m_CurrentPreset == LEGACY_PRESET_FLAG )
|
||||
{
|
||||
wxString legacyColorsPresetName = _( "legacy colors" );
|
||||
|
||||
cfg->m_UseStackupColors = false;
|
||||
|
||||
if( !cfg->FindPreset( legacyColorsPresetName ) )
|
||||
{
|
||||
cfg->m_LayerPresets.emplace_back( legacyColorsPresetName,
|
||||
GetAdapter().GetDefaultVisibleLayers(),
|
||||
GetAdapter().GetDefaultColors() );
|
||||
}
|
||||
|
||||
cfg->m_CurrentPreset = FOLLOW_PLOT_SETTINGS;
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ APPEARANCE_CONTROLS_3D::~APPEARANCE_CONTROLS_3D()
|
||||
wxSize APPEARANCE_CONTROLS_3D::GetBestSize() const
|
||||
{
|
||||
DPI_SCALING_COMMON dpi( nullptr, m_frame );
|
||||
wxSize size( 220 * dpi.GetScaleFactor(), 480 * dpi.GetScaleFactor() );
|
||||
wxSize size( 228 * dpi.GetScaleFactor(), 480 * dpi.GetScaleFactor() );
|
||||
return size;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user