Slightly modify keywords used to store color config of Eeschema and Pcbnew, to avoid this config destroyed each time a stable version is run.

This commit is contained in:
jean-pierre charras 2017-08-27 09:06:26 +02:00
parent a557838c61
commit e3c64f1f06
2 changed files with 42 additions and 42 deletions

View File

@ -164,27 +164,27 @@ void COLORS_DESIGN_SETTINGS::setupConfigParams()
for( int i = 0; i<PCB_LAYER_ID_COUNT; ++i )
{
wxString vn = wxString::Format(
wxT( "ColorPCBLayer_%s" ),
wxT( "Color4DPCBLayer_%s" ),
LSET::Name( PCB_LAYER_ID( i ) ) );
Add( vn, LOC_COLOR(i), m_LayersColors[i] );
}
Add( wxT( "ColorTxtFrontEx" ), ITEM_COLOR( LAYER_MOD_TEXT_FR ), LIGHTGRAY );
Add( wxT( "ColorTxtBackEx" ), ITEM_COLOR( LAYER_MOD_TEXT_BK ), BLUE );
Add( wxT( "ColorTxtInvisEx" ), ITEM_COLOR( LAYER_MOD_TEXT_INVISIBLE ), DARKGRAY );
Add( wxT( "ColorPadBackEx" ), ITEM_COLOR( LAYER_PAD_BK ), GREEN );
Add( wxT( "ColorAnchorEx" ), ITEM_COLOR( LAYER_ANCHOR ), BLUE );
Add( wxT( "ColorPadFrontEx" ), ITEM_COLOR( LAYER_PAD_FR ), RED );
Add( wxT( "ColorViaThruEx" ), ITEM_COLOR( LAYER_VIA_THROUGH ), LIGHTGRAY );
Add( wxT( "ColorViaBBlindEx" ), ITEM_COLOR( LAYER_VIA_BBLIND ), BROWN );
Add( wxT( "ColorViaMicroEx" ), ITEM_COLOR( LAYER_VIA_MICROVIA ), CYAN );
Add( wxT( "ColorNonPlatedEx" ), ITEM_COLOR( LAYER_NON_PLATED ), YELLOW );
Add( wxT( "ColorRatsEx" ), ITEM_COLOR( LAYER_RATSNEST ), WHITE );
Add( wxT( "ColorPCBBackground" ), ITEM_COLOR( LAYER_PCB_BACKGROUND ), BLACK );
Add( wxT( "ColorPCBCursor" ), ITEM_COLOR( LAYER_CURSOR ), WHITE );
Add( wxT( "ColorAuxItems" ), ITEM_COLOR( LAYER_AUX_ITEMS ), WHITE );
Add( wxT( "ColorWorksheet" ), ITEM_COLOR( LAYER_WORKSHEET ), DARKRED );
Add( wxT( "Color4DTxtFrontEx" ), ITEM_COLOR( LAYER_MOD_TEXT_FR ), LIGHTGRAY );
Add( wxT( "Color4DTxtBackEx" ), ITEM_COLOR( LAYER_MOD_TEXT_BK ), BLUE );
Add( wxT( "Color4DTxtInvisEx" ), ITEM_COLOR( LAYER_MOD_TEXT_INVISIBLE ), DARKGRAY );
Add( wxT( "Color4DPadBackEx" ), ITEM_COLOR( LAYER_PAD_BK ), GREEN );
Add( wxT( "Color4DAnchorEx" ), ITEM_COLOR( LAYER_ANCHOR ), BLUE );
Add( wxT( "Color4DPadFrontEx" ), ITEM_COLOR( LAYER_PAD_FR ), RED );
Add( wxT( "Color4DViaThruEx" ), ITEM_COLOR( LAYER_VIA_THROUGH ), LIGHTGRAY );
Add( wxT( "Color4DViaBBlindEx" ), ITEM_COLOR( LAYER_VIA_BBLIND ), BROWN );
Add( wxT( "Color4DViaMicroEx" ), ITEM_COLOR( LAYER_VIA_MICROVIA ), CYAN );
Add( wxT( "Color4DNonPlatedEx" ), ITEM_COLOR( LAYER_NON_PLATED ), YELLOW );
Add( wxT( "Color4DRatsEx" ), ITEM_COLOR( LAYER_RATSNEST ), WHITE );
Add( wxT( "Color4DPCBBackground" ), ITEM_COLOR( LAYER_PCB_BACKGROUND ), BLACK );
Add( wxT( "Color4DPCBCursor" ), ITEM_COLOR( LAYER_CURSOR ), WHITE );
Add( wxT( "Color4DAuxItems" ), ITEM_COLOR( LAYER_AUX_ITEMS ), WHITE );
Add( wxT( "Color4DWorksheet" ), ITEM_COLOR( LAYER_WORKSHEET ), DARKRED );
}

View File

@ -192,32 +192,32 @@ static PARAM_CFG_ARRAY& cfg_params()
ca.push_back( new PARAM_CFG_SETCOLOR( true, wxT( x ),\
&s_layerColor[SCH_LAYER_INDEX( y )], z ) );
CLR( "ColorWireEx", LAYER_WIRE, COLOR4D( GREEN ) )
CLR( "ColorBusEx", LAYER_BUS, COLOR4D( BLUE ) )
CLR( "ColorConnEx", LAYER_JUNCTION, COLOR4D( GREEN ) )
CLR( "ColorLLabelEx", LAYER_LOCLABEL, COLOR4D( BLACK ) )
CLR( "ColorHLabelEx", LAYER_HIERLABEL, COLOR4D( BROWN ) )
CLR( "ColorGLabelEx", LAYER_GLOBLABEL, COLOR4D( RED ) )
CLR( "ColorPinNumEx", LAYER_PINNUM, COLOR4D( RED ) )
CLR( "ColorPinNameEx", LAYER_PINNAM, COLOR4D( CYAN ) )
CLR( "ColorFieldEx", LAYER_FIELDS, COLOR4D( MAGENTA ) )
CLR( "ColorReferenceEx", LAYER_REFERENCEPART, COLOR4D( CYAN ) )
CLR( "ColorValueEx", LAYER_VALUEPART, COLOR4D( CYAN ) )
CLR( "ColorNoteEx", LAYER_NOTES, COLOR4D( LIGHTBLUE ) )
CLR( "ColorBodyEx", LAYER_DEVICE, COLOR4D( RED ) )
CLR( "ColorBodyBgEx", LAYER_DEVICE_BACKGROUND, COLOR4D( LIGHTYELLOW ) )
CLR( "ColorNetNameEx", LAYER_NETNAM, COLOR4D( DARKGRAY ) )
CLR( "ColorPinEx", LAYER_PIN, COLOR4D( RED ) )
CLR( "ColorSheetEx", LAYER_SHEET, COLOR4D( MAGENTA ) )
CLR( "ColorSheetFileNameEx", LAYER_SHEETFILENAME, COLOR4D( BROWN ) )
CLR( "ColorSheetNameEx", LAYER_SHEETNAME, COLOR4D( CYAN ) )
CLR( "ColorSheetLabelEx", LAYER_SHEETLABEL, COLOR4D( BROWN ) )
CLR( "ColorNoConnectEx", LAYER_NOCONNECT, COLOR4D( BLUE ) )
CLR( "ColorErcWEx", LAYER_ERC_WARN, COLOR4D( GREEN ) )
CLR( "ColorErcEEx", LAYER_ERC_ERR, COLOR4D( RED ) )
CLR( "ColorGridEx", LAYER_SCHEMATIC_GRID, COLOR4D( DARKGRAY ) )
CLR( "ColorBgCanvasEx", LAYER_SCHEMATIC_BACKGROUND, COLOR4D( WHITE ) )
CLR( "ColorBrighenedEx", LAYER_BRIGHTENED, COLOR4D( PUREMAGENTA ) )
CLR( "Color4DWireEx", LAYER_WIRE, COLOR4D( GREEN ) )
CLR( "Color4DBusEx", LAYER_BUS, COLOR4D( BLUE ) )
CLR( "Color4DConnEx", LAYER_JUNCTION, COLOR4D( GREEN ) )
CLR( "Color4DLLabelEx", LAYER_LOCLABEL, COLOR4D( BLACK ) )
CLR( "Color4DHLabelEx", LAYER_HIERLABEL, COLOR4D( BROWN ) )
CLR( "Color4DGLabelEx", LAYER_GLOBLABEL, COLOR4D( RED ) )
CLR( "Color4DPinNumEx", LAYER_PINNUM, COLOR4D( RED ) )
CLR( "Color4DPinNameEx", LAYER_PINNAM, COLOR4D( CYAN ) )
CLR( "Color4DFieldEx", LAYER_FIELDS, COLOR4D( MAGENTA ) )
CLR( "Color4DReferenceEx", LAYER_REFERENCEPART, COLOR4D( CYAN ) )
CLR( "Color4DValueEx", LAYER_VALUEPART, COLOR4D( CYAN ) )
CLR( "Color4DNoteEx", LAYER_NOTES, COLOR4D( LIGHTBLUE ) )
CLR( "Color4DBodyEx", LAYER_DEVICE, COLOR4D( RED ) )
CLR( "Color4DBodyBgEx", LAYER_DEVICE_BACKGROUND, COLOR4D( LIGHTYELLOW ) )
CLR( "Color4DNetNameEx", LAYER_NETNAM, COLOR4D( DARKGRAY ) )
CLR( "Color4DPinEx", LAYER_PIN, COLOR4D( RED ) )
CLR( "Color4DSheetEx", LAYER_SHEET, COLOR4D( MAGENTA ) )
CLR( "Color4DSheetFileNameEx", LAYER_SHEETFILENAME, COLOR4D( BROWN ) )
CLR( "Color4DSheetNameEx", LAYER_SHEETNAME, COLOR4D( CYAN ) )
CLR( "Color4DSheetLabelEx", LAYER_SHEETLABEL, COLOR4D( BROWN ) )
CLR( "Color4DNoConnectEx", LAYER_NOCONNECT, COLOR4D( BLUE ) )
CLR( "Color4DErcWEx", LAYER_ERC_WARN, COLOR4D( GREEN ) )
CLR( "Color4DErcEEx", LAYER_ERC_ERR, COLOR4D( RED ) )
CLR( "Color4DGridEx", LAYER_SCHEMATIC_GRID, COLOR4D( DARKGRAY ) )
CLR( "Color4DBgCanvasEx", LAYER_SCHEMATIC_BACKGROUND, COLOR4D( WHITE ) )
CLR( "Color4DBrighenedEx", LAYER_BRIGHTENED, COLOR4D( PUREMAGENTA ) )
}
return ca;