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

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

parent efceacbd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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();
}

+13 −10
Original line number Diff line number Diff line
@@ -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 );

@@ -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 );
}