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

Layers manager: add in popup menu option to hide all coppers layers but active layer.

Design rules: increase number of vias and tracks sizes
Pcbnew: netlist reader: change from my recent commits to keep netnames in pads for footprints not in netlist
(allow an user to place some footprints by hand, set pads netnames and do not lost these netnames when loading a netlsit)
Fix other very minor issues.
parent ba689c10
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -823,6 +823,9 @@ void EDA_DRAW_FRAME::UpdateStatusBar()
    // We already decided the formatter above
    Line.Printf( locformatter, dXpos, dYpos );
    SetStatusText( Line, 3 );

    // refresh units display
    DisplayUnitsMsg();
}


+0 −5
Original line number Diff line number Diff line
@@ -129,11 +129,6 @@ LIB_VIEW_FRAME::LIB_VIEW_FRAME( wxWindow* father, CMP_LIBRARY* Library, wxSemaph
    GetScreen()->m_Center = true;      // Center coordinate origins on screen.
    LoadSettings();

    // Initialize grid id to a default value if not found in config or bad:
    if( ( m_LastGridSizeId <= 0 ) ||
        ( m_LastGridSizeId < ( ID_POPUP_GRID_USER - ID_POPUP_GRID_LEVEL_1000 ) ) )
        m_LastGridSizeId = ID_POPUP_GRID_LEVEL_50 - ID_POPUP_GRID_LEVEL_1000;

    SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y );
    GetScreen()->SetGrid( ID_POPUP_GRID_LEVEL_1000 + m_LastGridSizeId  );

+14 −5
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ GERBER_LAYER_WIDGET::GERBER_LAYER_WIDGET( GERBVIEW_FRAME* aParent, wxWindow* aFo

    // since Popupmenu() calls this->ProcessEvent() we must call this->Connect()
    // and not m_LayerScrolledWindow->Connect()
    Connect( ID_SHOW_ALL_COPPERS, ID_SHOW_NO_COPPERS, wxEVT_COMMAND_MENU_SELECTED,
    Connect( ID_SHOW_ALL_COPPERS, ID_SHOW_NO_COPPERS_BUT_ACTIVE, wxEVT_COMMAND_MENU_SELECTED,
        wxCommandEventHandler( GERBER_LAYER_WIDGET::onPopupSelection ), NULL, this );

    // install the right click handler into each control at end of ReFill()
@@ -145,6 +145,9 @@ void GERBER_LAYER_WIDGET::onRightDownLayers( wxMouseEvent& event )
    menu.Append( new wxMenuItem( &menu, ID_SHOW_ALL_COPPERS,
                                 _("Show All Layers") ) );

    menu.Append( new wxMenuItem( &menu, ID_SHOW_NO_COPPERS_BUT_ACTIVE,
                                 _( "Hide All Layers But Active" ) ) );

    menu.Append( new wxMenuItem( &menu, ID_SHOW_NO_COPPERS,
                                 _( "Hide All Layers" ) ) );

@@ -164,12 +167,18 @@ void GERBER_LAYER_WIDGET::onPopupSelection( wxCommandEvent& event )
    {
    case ID_SHOW_ALL_COPPERS:
    case ID_SHOW_NO_COPPERS:
    case ID_SHOW_NO_COPPERS_BUT_ACTIVE:
        rowCount = GetLayerRowCount();
        for( int row=0; row < rowCount; ++row )
        {
            bool loc_visible = visible;
            if( (menuId == ID_SHOW_NO_COPPERS_BUT_ACTIVE ) &&
                (row == m_CurrentRow ) )
                loc_visible = true;

            wxCheckBox* cb = (wxCheckBox*) getLayerComp( row, 3 );
            cb->SetValue( visible );
            if( visible )
            cb->SetValue( loc_visible );
            if( loc_visible )
                visibleLayers |= (1 << row);
            else
                visibleLayers &= ~(1 << row);
+3 −2
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ class GERBER_LAYER_WIDGET : public LAYER_WIDGET
    // popup menu ids.
#define ID_SHOW_ALL_COPPERS             wxID_HIGHEST
#define ID_SHOW_NO_COPPERS              (wxID_HIGHEST+1)
#define ID_SHOW_NO_COPPERS_BUT_ACTIVE   (wxID_HIGHEST+2)

    /**
     * Function OnRightDownLayers
+16 −6
Original line number Diff line number Diff line
@@ -78,12 +78,6 @@ public:
    wxString          m_LibRef;        /* Name of the module in library (and
                                        * the default value when loading a
                                        * module from the library) */

    wxString          m_AlternateReference;  /* Used when m_Reference cannot
                                              * be used to identify the
                                              * footprint ( after a full
                                              * reannotation of the schematic */

    int           m_Attributs;          ///< Flag bits ( see Mod_Attribut )
    int           flag;                 /* Use to trace ratsnest and auto routing. */

@@ -340,6 +334,14 @@ public:
        return m_Reference->m_Text;
    }

    /**
     * Function SetReference
     * @param const wxString& - the reference designator text.
     */
    void SetReference( const wxString& aReference)
    {
        m_Reference->m_Text = aReference;
    }

    /**
     * Function GetValue
@@ -350,6 +352,14 @@ public:
        return m_Value->m_Text;
    }

    /**
     * Function SetValue
     * @param const wxString& - the value text.
     */
    void SetValue( const wxString& aValue )
    {
        m_Value->m_Text = aValue;
    }

    /**
     * Function FindPadByName
Loading