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

Gerbview: fix bug 742785.

parent 89ff6c64
Loading
Loading
Loading
Loading
+0 −6
Original line number Original line Diff line number Diff line
@@ -28,7 +28,6 @@ CvPCB


EESchema
EESchema
--------
--------
* Use collector classes.
* Drag and drop between two EESchema windows.
* Drag and drop between two EESchema windows.


Wayne:
Wayne:
@@ -45,11 +44,6 @@ E6) Start initial work for changing component library file format to use Dick's
     support to the library editor.
     support to the library editor.




GerbView
--------
* List control for layer sort on the fly
* Add excellon2 drill file support (small good library)



PCBNew
PCBNew
------
------
+3 −8
Original line number Original line Diff line number Diff line
@@ -142,18 +142,13 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
{
{
    int     rowCount;
    int     rowCount;
    int     menuId = event.GetId();
    int     menuId = event.GetId();
    bool    visible;
    bool    visible = (menuId == ID_SHOW_ALL_COPPERS) ? true : false;;
    int     visibleLayers = 0;
    int     visibleLayers = 0;


    switch( menuId )
    switch( menuId )
    {
    {
    case ID_SHOW_ALL_COPPERS:
    case ID_SHOW_ALL_COPPERS:
        visible = true;
        goto L_change_coppers;

    case ID_SHOW_NO_COPPERS:
    case ID_SHOW_NO_COPPERS:
        visible = false;
    L_change_coppers:
        rowCount = GetLayerRowCount();
        rowCount = GetLayerRowCount();
        for( int row=0; row < rowCount; ++row )
        for( int row=0; row < rowCount; ++row )
        {
        {
@@ -182,7 +177,8 @@ void GERBER_LAYER_WIDGET::ReFill()
    {
    {
        wxString msg;
        wxString msg;
        msg.Printf( _("Layer %d"), layer+1 );
        msg.Printf( _("Layer %d"), layer+1 );
        AppendLayerRow( LAYER_WIDGET::ROW( msg, layer, brd->GetLayerColor( layer ), wxEmptyString, true ) );
        AppendLayerRow( LAYER_WIDGET::ROW( msg, layer,
                        brd->GetLayerColor( layer ), wxEmptyString, true ) );
    }
    }


    installRightLayerClickHandler();
    installRightLayerClickHandler();
@@ -213,7 +209,6 @@ bool GERBER_LAYER_WIDGET::OnLayerSelect( int aLayer )
void GERBER_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal )
void GERBER_LAYER_WIDGET::OnLayerVisible( int aLayer, bool isVisible, bool isFinal )
{
{
    BOARD* brd = myframe->GetBoard();
    BOARD* brd = myframe->GetBoard();

    int visibleLayers = brd->GetVisibleLayers();
    int visibleLayers = brd->GetVisibleLayers();


    if( isVisible )
    if( isVisible )
+0 −5
Original line number Original line Diff line number Diff line
@@ -19,13 +19,8 @@
void GERBVIEW_FRAME::Process_Config( wxCommandEvent& event )
void GERBVIEW_FRAME::Process_Config( wxCommandEvent& event )
{
{
    int      id = event.GetId();
    int      id = event.GetId();
    wxPoint  pos;
    wxString FullFileName;
    wxString FullFileName;


    pos    = GetPosition();
    pos.x += 20;
    pos.y += 20;

    switch( id )
    switch( id )
    {
    {
    /* Hotkey IDs */
    /* Hotkey IDs */
+5 −4
Original line number Original line Diff line number Diff line
@@ -62,6 +62,7 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( wxWindow* father,


    SetBoard( new BOARD( NULL, this ) );
    SetBoard( new BOARD( NULL, this ) );
    GetBoard()->SetEnabledLayers( FULL_LAYERS );     // All 32 layers enabled at first.
    GetBoard()->SetEnabledLayers( FULL_LAYERS );     // All 32 layers enabled at first.
    GetBoard()->SetVisibleLayers( FULL_LAYERS );     // All 32 layers visible.


    // Create the PCB_LAYER_WIDGET *after* SetBoard():
    // Create the PCB_LAYER_WIDGET *after* SetBoard():
    wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
    wxFont font = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );
@@ -244,8 +245,8 @@ void GERBVIEW_FRAME::SaveSettings()


    config->Write( GerbviewShowPageSizeOption, pageSize_opt );
    config->Write( GerbviewShowPageSizeOption, pageSize_opt );
    config->Write( GerbviewShowDCodes, IsElementVisible( DCODES_VISIBLE ) );
    config->Write( GerbviewShowDCodes, IsElementVisible( DCODES_VISIBLE ) );
    // Save the drill file history list
    // Save the drill file history list.
    // because we have 2 file historues, we must save this one
    // Because we have 2 file histories, we must save this one
    // in a specific path
    // in a specific path
    config->SetPath(wxT("drl_files") );
    config->SetPath(wxT("drl_files") );
    m_drillFileHistory.Save( *config );
    m_drillFileHistory.Save( *config );
@@ -334,7 +335,7 @@ int GERBVIEW_FRAME::getNextAvailableLayer( int aLayer ) const
{
{
    int layer = aLayer;
    int layer = aLayer;


    for( int i = 0;  i < NB_LAYERS;  i++ )
    for( int i = 0;  i < LAYER_COUNT;  i++ )
    {
    {
        GERBER_IMAGE* gerber = g_GERBER_List[ layer ];
        GERBER_IMAGE* gerber = g_GERBER_List[ layer ];


@@ -343,7 +344,7 @@ int GERBVIEW_FRAME::getNextAvailableLayer( int aLayer ) const


        layer++;
        layer++;


        if( layer >= NB_LAYERS )
        if( layer >= LAYER_COUNT )
            layer = 0;
            layer = 0;
    }
    }


+1 −1
Original line number Original line Diff line number Diff line
@@ -15,7 +15,7 @@ enum gerbview_ids
{
{
    ID_MAIN_MENUBAR = ID_END_LIST,
    ID_MAIN_MENUBAR = ID_END_LIST,


    ID_GERBVIEW_SHOW_LIST_DCODES = 1,
    ID_GERBVIEW_SHOW_LIST_DCODES,
    ID_GERBVIEW_LOAD_DRILL_FILE,
    ID_GERBVIEW_LOAD_DRILL_FILE,
    ID_GERBVIEW_LOAD_DCODE_FILE,
    ID_GERBVIEW_LOAD_DCODE_FILE,
    ID_GERBVIEW_ERASE_ALL,
    ID_GERBVIEW_ERASE_ALL,
Loading