Honour ModEdit layer colors in browser and previews.
Fixes: lp:1793141 * https://bugs.launchpad.net/kicad/+bug/1793141
This commit is contained in:
parent
9f068d66a8
commit
e485cee384
|
@ -181,28 +181,21 @@ void COLORS_DESIGN_SETTINGS::setupConfigParams()
|
|||
|
||||
switch( m_frameType )
|
||||
{
|
||||
case FRAME_PCB: break; // no prefix
|
||||
|
||||
case FRAME_PCB_MODULE_EDITOR:
|
||||
SetConfigPrefix( "ModEdit" );
|
||||
break;
|
||||
case FRAME_GERBER:
|
||||
case FRAME_PCB: /* no prefix */ break;
|
||||
|
||||
case FRAME_CVPCB_DISPLAY:
|
||||
case FRAME_PCB_MODULE_VIEWER:
|
||||
case FRAME_PCB_MODULE_VIEWER_MODAL:
|
||||
case FRAME_PCB_FOOTPRINT_WIZARD:
|
||||
case FRAME_PCB_FOOTPRINT_PREVIEW:
|
||||
SetConfigPrefix( "fpview_" );
|
||||
break;
|
||||
case FRAME_PCB_MODULE_EDITOR: SetConfigPrefix( "ModEdit" ); break;
|
||||
|
||||
case FRAME_PCB_DISPLAY3D:
|
||||
SetConfigPrefix( "fp3d_" );
|
||||
break;
|
||||
case FRAME_PCB_DISPLAY3D: SetConfigPrefix( "fp3d_" ); break;
|
||||
|
||||
default:
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
|
||||
wxString fmt( "Color4DPCBLayer_%s" );
|
||||
|
||||
for( int i = 0; i < PCB_LAYER_ID_COUNT; ++i )
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
#include <footprint_preview_panel.h>
|
||||
#include <pcb_draw_panel_gal.h>
|
||||
|
||||
#include <kiface_i.h>
|
||||
#include <kiway.h>
|
||||
#include <io_mgr.h>
|
||||
#include <fp_lib_table.h>
|
||||
|
@ -261,6 +261,7 @@ FOOTPRINT_PREVIEW_PANEL::FOOTPRINT_PREVIEW_PANEL( KIWAY* aKiway, wxWindow* aPare
|
|||
|
||||
m_dummyBoard = std::make_unique<BOARD>();
|
||||
m_colorsSettings = std::make_unique<COLORS_DESIGN_SETTINGS>( FRAME_PCB_FOOTPRINT_PREVIEW );
|
||||
m_colorsSettings->Load( Kiface().KifaceSettings() );
|
||||
|
||||
UseColorScheme( m_colorsSettings.get() );
|
||||
SyncLayersVisibility( &*m_dummyBoard );
|
||||
|
|
Loading…
Reference in New Issue