Save both front and back soldermask colour preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/8856
This commit is contained in:
parent
19de38bbae
commit
29b23df7a1
|
@ -195,8 +195,8 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
|
||||||
set( colors->GetColor( LAYER_3D_COPPER ), m_boardAdapter.m_CopperColor );
|
set( colors->GetColor( LAYER_3D_COPPER ), m_boardAdapter.m_CopperColor );
|
||||||
set( colors->GetColor( LAYER_3D_SILKSCREEN_BOTTOM ), m_boardAdapter.m_SilkScreenColorBot );
|
set( colors->GetColor( LAYER_3D_SILKSCREEN_BOTTOM ), m_boardAdapter.m_SilkScreenColorBot );
|
||||||
set( colors->GetColor( LAYER_3D_SILKSCREEN_TOP ), m_boardAdapter.m_SilkScreenColorTop );
|
set( colors->GetColor( LAYER_3D_SILKSCREEN_TOP ), m_boardAdapter.m_SilkScreenColorTop );
|
||||||
set( colors->GetColor( LAYER_3D_SOLDERMASK ), m_boardAdapter.m_SolderMaskColorBot );
|
set( colors->GetColor( LAYER_3D_SOLDERMASK_BOTTOM ), m_boardAdapter.m_SolderMaskColorBot );
|
||||||
set( colors->GetColor( LAYER_3D_SOLDERMASK ), m_boardAdapter.m_SolderMaskColorTop );
|
set( colors->GetColor( LAYER_3D_SOLDERMASK_TOP ), m_boardAdapter.m_SolderMaskColorTop );
|
||||||
set( colors->GetColor( LAYER_3D_SOLDERPASTE ), m_boardAdapter.m_SolderPasteColor );
|
set( colors->GetColor( LAYER_3D_SOLDERPASTE ), m_boardAdapter.m_SolderPasteColor );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -436,8 +436,8 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
|
||||||
set_color( colors->GetColor( LAYER_3D_SILKSCREEN_BOTTOM ),
|
set_color( colors->GetColor( LAYER_3D_SILKSCREEN_BOTTOM ),
|
||||||
m_boardAdapter.m_SilkScreenColorBot );
|
m_boardAdapter.m_SilkScreenColorBot );
|
||||||
set_color( colors->GetColor( LAYER_3D_SILKSCREEN_TOP ), m_boardAdapter.m_SilkScreenColorTop );
|
set_color( colors->GetColor( LAYER_3D_SILKSCREEN_TOP ), m_boardAdapter.m_SilkScreenColorTop );
|
||||||
set_color( colors->GetColor( LAYER_3D_SOLDERMASK ), m_boardAdapter.m_SolderMaskColorBot );
|
set_color( colors->GetColor( LAYER_3D_SOLDERMASK_BOTTOM ), m_boardAdapter.m_SolderMaskColorBot );
|
||||||
set_color( colors->GetColor( LAYER_3D_SOLDERMASK ), m_boardAdapter.m_SolderMaskColorTop );
|
set_color( colors->GetColor( LAYER_3D_SOLDERMASK_TOP ), m_boardAdapter.m_SolderMaskColorTop );
|
||||||
set_color( colors->GetColor( LAYER_3D_SOLDERPASTE ), m_boardAdapter.m_SolderPasteColor );
|
set_color( colors->GetColor( LAYER_3D_SOLDERPASTE ), m_boardAdapter.m_SolderPasteColor );
|
||||||
|
|
||||||
if( cfg )
|
if( cfg )
|
||||||
|
@ -586,7 +586,8 @@ void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
|
||||||
save_color( m_boardAdapter.m_CopperColor, LAYER_3D_COPPER );
|
save_color( m_boardAdapter.m_CopperColor, LAYER_3D_COPPER );
|
||||||
save_color( m_boardAdapter.m_SilkScreenColorBot, LAYER_3D_SILKSCREEN_BOTTOM );
|
save_color( m_boardAdapter.m_SilkScreenColorBot, LAYER_3D_SILKSCREEN_BOTTOM );
|
||||||
save_color( m_boardAdapter.m_SilkScreenColorTop, LAYER_3D_SILKSCREEN_TOP );
|
save_color( m_boardAdapter.m_SilkScreenColorTop, LAYER_3D_SILKSCREEN_TOP );
|
||||||
save_color( m_boardAdapter.m_SolderMaskColorTop, LAYER_3D_SOLDERMASK );
|
save_color( m_boardAdapter.m_SolderMaskColorBot, LAYER_3D_SOLDERMASK_BOTTOM );
|
||||||
|
save_color( m_boardAdapter.m_SolderMaskColorTop, LAYER_3D_SOLDERMASK_TOP );
|
||||||
save_color( m_boardAdapter.m_SolderPasteColor, LAYER_3D_SOLDERPASTE );
|
save_color( m_boardAdapter.m_SolderPasteColor, LAYER_3D_SOLDERPASTE );
|
||||||
|
|
||||||
Pgm().GetSettingsManager().SaveColorSettings( colors, "3d_viewer" );
|
Pgm().GetSettingsManager().SaveColorSettings( colors, "3d_viewer" );
|
||||||
|
|
|
@ -163,7 +163,8 @@ static const std::map<int, COLOR4D> s_defaultTheme =
|
||||||
{ LAYER_3D_COPPER, COLOR4D( 0.7, 0.61, 0.0, 1.0 ) },
|
{ LAYER_3D_COPPER, COLOR4D( 0.7, 0.61, 0.0, 1.0 ) },
|
||||||
{ LAYER_3D_SILKSCREEN_BOTTOM, COLOR4D( 0.9, 0.9, 0.9, 1.0 ) },
|
{ LAYER_3D_SILKSCREEN_BOTTOM, COLOR4D( 0.9, 0.9, 0.9, 1.0 ) },
|
||||||
{ LAYER_3D_SILKSCREEN_TOP, COLOR4D( 0.9, 0.9, 0.9, 1.0 ) },
|
{ LAYER_3D_SILKSCREEN_TOP, COLOR4D( 0.9, 0.9, 0.9, 1.0 ) },
|
||||||
{ LAYER_3D_SOLDERMASK, COLOR4D( 0.08, 0.2, 0.14, 0.83 ) },
|
{ LAYER_3D_SOLDERMASK_BOTTOM, COLOR4D( 0.08, 0.2, 0.14, 0.83 ) },
|
||||||
|
{ LAYER_3D_SOLDERMASK_TOP, COLOR4D( 0.08, 0.2, 0.14, 0.83 ) },
|
||||||
{ LAYER_3D_SOLDERPASTE, COLOR4D( 0.5, 0.5, 0.5, 1.0 ) }
|
{ LAYER_3D_SOLDERPASTE, COLOR4D( 0.5, 0.5, 0.5, 1.0 ) }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -306,7 +307,8 @@ static const std::map<int, COLOR4D> s_classicTheme =
|
||||||
{ LAYER_3D_COPPER, COLOR4D( 0.7, 0.61, 0.0, 1.0 ) },
|
{ LAYER_3D_COPPER, COLOR4D( 0.7, 0.61, 0.0, 1.0 ) },
|
||||||
{ LAYER_3D_SILKSCREEN_BOTTOM, COLOR4D( 0.9, 0.9, 0.9, 1.0 ) },
|
{ LAYER_3D_SILKSCREEN_BOTTOM, COLOR4D( 0.9, 0.9, 0.9, 1.0 ) },
|
||||||
{ LAYER_3D_SILKSCREEN_TOP, COLOR4D( 0.9, 0.9, 0.9, 1.0 ) },
|
{ LAYER_3D_SILKSCREEN_TOP, COLOR4D( 0.9, 0.9, 0.9, 1.0 ) },
|
||||||
{ LAYER_3D_SOLDERMASK, COLOR4D( 0.08, 0.2, 0.14, 0.83 ) },
|
{ LAYER_3D_SOLDERMASK_BOTTOM, COLOR4D( 0.08, 0.2, 0.14, 0.83 ) },
|
||||||
|
{ LAYER_3D_SOLDERMASK_TOP, COLOR4D( 0.08, 0.2, 0.14, 0.83 ) },
|
||||||
{ LAYER_3D_SOLDERPASTE, COLOR4D( 0.5, 0.5, 0.5, 1.0 ) }
|
{ LAYER_3D_SOLDERPASTE, COLOR4D( 0.5, 0.5, 0.5, 1.0 ) }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,8 @@ COLOR_SETTINGS::COLOR_SETTINGS( const wxString& aFilename ) :
|
||||||
CLR( "3d_viewer.copper", LAYER_3D_COPPER );
|
CLR( "3d_viewer.copper", LAYER_3D_COPPER );
|
||||||
CLR( "3d_viewer.silkscreen_bottom", LAYER_3D_SILKSCREEN_BOTTOM );
|
CLR( "3d_viewer.silkscreen_bottom", LAYER_3D_SILKSCREEN_BOTTOM );
|
||||||
CLR( "3d_viewer.silkscreen_top", LAYER_3D_SILKSCREEN_TOP );
|
CLR( "3d_viewer.silkscreen_top", LAYER_3D_SILKSCREEN_TOP );
|
||||||
CLR( "3d_viewer.soldermask", LAYER_3D_SOLDERMASK );
|
CLR( "3d_viewer.soldermask_bottom", LAYER_3D_SOLDERMASK_BOTTOM );
|
||||||
|
CLR( "3d_viewer.soldermask_top", LAYER_3D_SOLDERMASK_TOP );
|
||||||
CLR( "3d_viewer.solderpaste", LAYER_3D_SOLDERPASTE );
|
CLR( "3d_viewer.solderpaste", LAYER_3D_SOLDERPASTE );
|
||||||
|
|
||||||
registerMigration( 0, 1, std::bind( &COLOR_SETTINGS::migrateSchema0to1, this ) );
|
registerMigration( 0, 1, std::bind( &COLOR_SETTINGS::migrateSchema0to1, this ) );
|
||||||
|
|
|
@ -416,7 +416,8 @@ enum LAYER_3D_ID : int
|
||||||
LAYER_3D_COPPER,
|
LAYER_3D_COPPER,
|
||||||
LAYER_3D_SILKSCREEN_BOTTOM,
|
LAYER_3D_SILKSCREEN_BOTTOM,
|
||||||
LAYER_3D_SILKSCREEN_TOP,
|
LAYER_3D_SILKSCREEN_TOP,
|
||||||
LAYER_3D_SOLDERMASK,
|
LAYER_3D_SOLDERMASK_BOTTOM,
|
||||||
|
LAYER_3D_SOLDERMASK_TOP,
|
||||||
LAYER_3D_SOLDERPASTE,
|
LAYER_3D_SOLDERPASTE,
|
||||||
|
|
||||||
LAYER_3D_END = LAYER_3D_SOLDERPASTE
|
LAYER_3D_END = LAYER_3D_SOLDERPASTE
|
||||||
|
|
Loading…
Reference in New Issue