Commit cdc114cb authored by charras's avatar charras
Browse files

pcbnew: minor cosmetic enhancement in setup layers dialog.

Updated denis dupeyron email address
parent 01884b58
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -5,7 +5,7 @@ Information
-----------
-----------
First written: 02-Mar-2010
First written: 02-Mar-2010


Written by: denis[dot]dupeyron[at]gmail[dot]com
Written by: calchan at gentoo dot org




For regular users
For regular users
+1 −0
Original line number Original line Diff line number Diff line
@@ -59,6 +59,7 @@ set(BITMAP_SRCS
    Browse_Files.xpm
    Browse_Files.xpm
    cancel_tool.xpm
    cancel_tool.xpm
    Cancel.xpm
    Cancel.xpm
    checked_ok.xpm
    component_select_unit.xpm
    component_select_unit.xpm
    component_select_alternate_shape.xpm
    component_select_alternate_shape.xpm
    config.xpm
    config.xpm
+1 −0
Original line number Original line Diff line number Diff line
@@ -54,6 +54,7 @@ extern const char* break_line_xpm[];
extern const char* browse_files_xpm[];
extern const char* browse_files_xpm[];
extern const char* cancel_tool_xpm[];
extern const char* cancel_tool_xpm[];
extern const char* cancel_xpm[];
extern const char* cancel_xpm[];
extern const char* checked_ok_xpm[];
extern const char* component_select_alternate_shape_xpm[];
extern const char* component_select_alternate_shape_xpm[];
extern const char* component_select_unit_xpm[];
extern const char* component_select_unit_xpm[];
extern const char* config_xpm[];
extern const char* config_xpm[];
+9 −8
Original line number Original line Diff line number Diff line
@@ -53,6 +53,7 @@ struct CTLs
    wxControl*      name;
    wxControl*      name;
    wxCheckBox*     checkbox;
    wxCheckBox*     checkbox;
    wxControl*      choice;
    wxControl*      choice;
    wxPanel *       panel;
};
};




@@ -250,6 +251,7 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( WinEDA_PcbFrame* parent ) :


    m_CopperLayerCount = m_Pcb->GetCopperLayerCount();
    m_CopperLayerCount = m_Pcb->GetCopperLayerCount();
    showCopperChoice( m_CopperLayerCount );
    showCopperChoice( m_CopperLayerCount );
    setCopperLayerCheckBoxes( m_CopperLayerCount );


    showBoardLayerNames();
    showBoardLayerNames();


@@ -311,8 +313,6 @@ void DIALOG_LAYERS_SETUP::showCopperChoice( int copperCount )
{
{
    static const int copperCounts[] = { 2,4,6,8,10,12,14,16 };
    static const int copperCounts[] = { 2,4,6,8,10,12,14,16 };


    //D(printf("boardsCopperCount=%d\n", copperCount );)

    for( unsigned i = 0;  i<sizeof(copperCounts);  ++i )
    for( unsigned i = 0;  i<sizeof(copperCounts);  ++i )
    {
    {
        // note this will change a one layer board to 2:
        // note this will change a one layer board to 2:
@@ -432,14 +432,15 @@ void DIALOG_LAYERS_SETUP::setCopperLayerCheckBoxes( int copperCount )
    }
    }


    int layer;
    int layer;
    for( layer=LAYER_N_2;  copperCount > 0;  ++layer, --copperCount )
    for( layer=LAYER_N_2; layer < NB_COPPER_LAYERS-1;  ++layer, --copperCount )
    {
    {
        setLayerCheckBox( layer, true );
        CTLs ctl = getCTLs(layer);
    }
        bool state = copperCount > 0;
        ctl.name->Enable( state );
        ctl.checkbox->Enable( state );
        ctl.choice->Enable( state );


    for( ;  layer < NB_COPPER_LAYERS-1;  ++layer )
        setLayerCheckBox( layer, state );
    {
        setLayerCheckBox( layer, false );
    }
    }
}
}


Loading