Commit 020e8759 authored by Lorenzo Marcantonio's avatar Lorenzo Marcantonio Committed by Wayne Stambaugh

Patch to fix setting grid color in EESchema with some minor changes.

parent efceacbd
......@@ -45,6 +45,7 @@ static ColorButton SheetColorButtons[] = {
{ _( "Sheet" ), LAYER_SHEET },
{ _( "Sheet file name" ), LAYER_SHEETFILENAME },
{ _( "Sheet name" ), LAYER_SHEETNAME },
{ _( "Sheet label" ), LAYER_SHEETLABEL },
{ _( "Hierarchical label" ), LAYER_HIERLABEL },
{ wxT( "" ), -1 } // Sentinel marking end of list.
};
......@@ -291,6 +292,7 @@ void DIALOG_COLOR_CONFIG::UpdateLayerSettings()
else
g_DrawBgColor = BLACK;
m_Parent->SetGridColor( g_LayerDescr.LayerColor[LAYER_GRID] );
m_Parent->Refresh();
}
......
......@@ -409,8 +409,7 @@ void SCH_EDIT_FRAME::SaveProjectFile( wxWindow* displayframe, bool askoverwrite
if( dlg.ShowModal() == wxID_CANCEL )
return;
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP,
GetProjectFileParameters() );
wxGetApp().WriteProjectConfig( dlg.GetPath(), GROUP, GetProjectFileParameters() );
}
......@@ -534,6 +533,9 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings( void )
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorErcE" ),
&g_LayerDescr.LayerColor[LAYER_ERC_ERR],
RED ) );
m_configSettings.push_back( new PARAM_CFG_SETCOLOR( true, wxT( "ColorGrid" ),
&g_LayerDescr.LayerColor[LAYER_GRID],
DARKGRAY ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PrintMonochrome" ),
&m_printMonochrome, true ) );
m_configSettings.push_back( new PARAM_CFG_BOOL( true, wxT( "PrintSheetReferenceAndTitleBlock" ),
......@@ -558,8 +560,10 @@ void SCH_EDIT_FRAME::LoadSettings()
wxGetApp().ReadCurrentSetupValues( GetConfigurationSettings() );
g_DrawDefaultLineThickness = cfg->Read( DefaultDrawLineWidthEntry,
(long) 6 );
// This is eqired until someone gets rid of the global variable g_LayerDescription().
m_GridColor = g_LayerDescr.LayerColor[LAYER_GRID];
g_DrawDefaultLineThickness = cfg->Read( DefaultDrawLineWidthEntry,(long) 6 );
cfg->Read( ShowHiddenPinsEntry, &m_ShowAllPins, false );
cfg->Read( HorzVertLinesOnlyEntry, &g_HVLines, true );
......@@ -633,8 +637,8 @@ void SCH_EDIT_FRAME::LoadSettings()
catch( IO_ERROR e )
{
// @todo show error msg
D(printf("templatefieldnames parsing error: '%s'\n",
CONV_TO_UTF8(e.errorText) );)
D( printf( "templatefieldnames parsing error: '%s'\n",
CONV_TO_UTF8( e.errorText ) ); )
}
}
......@@ -711,7 +715,6 @@ void SCH_EDIT_FRAME::SaveSettings()
record.Replace( wxT("\n"), wxT(""), true ); // strip all newlines
record.Replace( wxT(" "), wxT(" "), true ); // double space to single
cfg->Write( FieldNamesEntry, record );
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment