Commit 76436943 authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Add comments. Fix bug #1351507 (pad color does not reflect, whether the pad...

Add comments. Fix bug  #1351507 (pad color does not reflect, whether the pad is on front or back layer) and bug #1351388  (Adding a keepout area appears on the opposite layer than selected)
parent d9c76c0d
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -298,12 +298,29 @@ public:

    static LSET AllLayersMask();

    /**
     * Function FrontTechMask
     * returns a mask holding all technical layers (no CU layer) on front side.
     */
    static LSET FrontTechMask();

    /**
     * Function BackTechMask
     * returns a mask holding all technical layers (no CU layer) on back side.
     */
    static LSET BackTechMask();
    static LSET AllTechMask();

    /**
     * Function FrontMask
     * returns a mask holding all technical layers and the external CU layer on front side.
     */
    static LSET FrontMask();

    /**
     * Function BackMask
     * returns a mask holding all technical layers and the external CU layer on back side.
     */
    static LSET BackMask();

    static LSET UserMask();
+2 −2
Original line number Diff line number Diff line
@@ -126,12 +126,12 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDraw_mode,
        drawInfo.m_ShowPadFilled = false;

    EDA_COLOR_T color = BLACK;
    if( ( m_layerMask & LSET::FrontMask() ).any() )
    if( m_layerMask[F_Cu] )
    {
        color = brd->GetVisibleElementColor( PAD_FR_VISIBLE );
    }

    if( ( m_layerMask & LSET::BackMask() ).any() )
    if( m_layerMask[B_Cu] )
    {
        color = ColorMix( color, brd->GetVisibleElementColor( PAD_BK_VISIBLE ) );
    }
+7 −5
Original line number Diff line number Diff line
@@ -5,9 +5,9 @@
/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 2013 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
 * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
  * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
 * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
 * Copyright (C) 2014 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
  * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
@@ -154,8 +154,9 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog()

    // Build copper layer list and append to layer widget
    LSET show = LSET::AllCuMask( board->GetCopperLayerCount() );
    int imgIdx = 0;

    for( LSEQ cu_stack = show.UIOrder();  cu_stack;  ++cu_stack )
    for( LSEQ cu_stack = show.UIOrder();  cu_stack;  ++cu_stack, imgIdx++ )
    {
        LAYER_ID layer = *cu_stack;

@@ -167,7 +168,8 @@ void DIALOG_KEEPOUT_AREA_PROPERTIES::initDialog()

        imageList->Add( makeLayerBitmap( layerColor ) );

        int itemIndex = m_LayerSelectionCtrl->InsertItem( 0, msg, layer );
        int itemIndex = m_LayerSelectionCtrl->InsertItem(
                m_LayerSelectionCtrl->GetItemCount(), msg, imgIdx );

        if( m_zonesettings.m_CurrentZone_Layer == layer )
            m_LayerSelectionCtrl->Select( itemIndex );