void PCB_LAYER_WIDGET::ReFillRender()
{
    BOARD* board = myframe->GetBoard();
    ClearRenderRows();

    // Add "Render" tab rows to LAYER_WIDGET, after setting color and checkbox state.
    // Because s_render_rows is created static, we must explicitely call
    // wxGetTranslation for texts which are internationalized (tool tips
    // and item names)
    for( unsigned row=0;  row<DIM(s_render_rows);  ++row )
    {
        LAYER_WIDGET::ROW renderRow = s_render_rows[row];

        renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip );
        renderRow.rowName = wxGetTranslation( s_render_rows[row].rowName );

        if( renderRow.color != -1 )       // does this row show a color?
        {
            // this window frame must have an established BOARD, i.e. after SetBoard()
            renderRow.color = board->GetVisibleElementColor( renderRow.id );
        }

        renderRow.state = board->IsElementVisible( renderRow.id );

        AppendRenderRow( renderRow );
    }
}
Exemple #2
0
void PCB_LAYER_WIDGET::ReFillRender()
{
    BOARD* board = myframe->GetBoard();
    auto settings = board->GetDesignSettings();

    ClearRenderRows();

    // Add "Items" tab rows to LAYER_WIDGET, after setting color and checkbox state.
    // Because s_render_rows is created static, we must explicitly call
    // wxGetTranslation for texts which are internationalized (tool tips
    // and item names)
    for( unsigned row=0;  row<arrayDim(s_render_rows);  ++row )
    {
        LAYER_WIDGET::ROW renderRow = s_render_rows[row];

        if( m_fp_editor_mode && !isAllowedInFpMode( renderRow.id ) )
            continue;

        if( renderRow.id == LAYER_VIA_MICROVIA && !settings.m_MicroViasAllowed )
            continue;

        if( renderRow.id == LAYER_VIA_BBLIND && !settings.m_BlindBuriedViaAllowed )
            continue;

        if( !renderRow.spacer )
        {
            renderRow.tooltip = wxGetTranslation( s_render_rows[row].tooltip );
            renderRow.rowName = wxGetTranslation( s_render_rows[row].rowName );

            if( renderRow.color != COLOR4D::UNSPECIFIED )       // does this row show a color?
            {
                // this window frame must have an established BOARD, i.e. after SetBoard()
                renderRow.color = myframe->Settings().Colors().GetItemColor( static_cast<GAL_LAYER_ID>( renderRow.id ) );
            }

            renderRow.state = board->IsElementVisible( static_cast<GAL_LAYER_ID>( renderRow.id ) );
        }

        AppendRenderRow( renderRow );
    }

    UpdateLayouts();
}
void PCB_LAYER_WIDGET::ReFillRender()
{
    BOARD*  board = myframe->GetBoard();
    ClearRenderRows();

    // Add "Render" tab rows to LAYER_WIDGET, after setting color and checkbox state.
    for( unsigned row=0;  row<DIM(s_render_rows);  ++row )
    {
        LAYER_WIDGET::ROW renderRow = s_render_rows[row];

        if( renderRow.color != -1 )       // does this row show a color?
        {
            // this window frame must have an established BOARD, i.e. after SetBoard()
            renderRow.color = board->GetVisibleElementColor( renderRow.id );
        }
        renderRow.state = board->IsElementVisible( renderRow.id );

        AppendRenderRow( renderRow );
    }
}