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

Pcbnew: drag functions: serious cleanup and better code. Use now the...

Pcbnew: drag functions: serious cleanup and better code. Use now the connectivity functions to find tracks connected to pads,
and therefore  tracks are now dragged when a end point is inside a pad, not necessary on the pad position.
However, drag functions still need more cleanup.
parent 3668f4cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ void Draw3D_ZaxisOblongCylinder( wxPoint aAxis1Pos, wxPoint aAxis2Pos,
        // Draw the oblong inner cylinder
        if( aHeight )
            Draw3D_VerticalPolygonalCylinder( inner_cornerBuffer, aHeight,
                                              true, aZpos, aBiuTo3DUnits );
                                              aZpos, true, aBiuTo3DUnits );

        // Build the horizontal full polygon shape
        // (outer polygon shape - inner polygon shape)
+1 −1
Original line number Diff line number Diff line
@@ -155,7 +155,7 @@ void EDA_LIST_DIALOG::SortList()
{
    wxArrayString list = m_listBox->GetStrings();

    if( list.IsEmpty() <= 0 )
    if( list.IsEmpty() )
        return;

    list.Sort( SortItems );
+10 −1
Original line number Diff line number Diff line
@@ -339,7 +339,16 @@ public:
     */
    void DeletePad( D_PAD* aPad, bool aQuery = true );

    void StartMovePad( D_PAD* Pad, wxDC* DC );
    /**
     * Function StartMovePad
     * Initialize a drag or move pad command
     * @param aPad = the pad to move or drag
     * @param aDC = the current device context
     * @param aDragConnectedTracks = true to drag connected tracks,
     *                               false to just move the pad
     */
    void StartMovePad( D_PAD* aPad, wxDC* aDC, bool aDragConnectedTracks );

    void RotatePad( D_PAD* Pad, wxDC* DC );
    void PlacePad( D_PAD* Pad, wxDC* DC );
    void Export_Pad_Settings( D_PAD* aPad );
+10 −1
Original line number Diff line number Diff line
@@ -937,7 +937,16 @@ public:

    // Footprint edition (see also PCB_BASE_FRAME)
    void InstallModuleOptionsFrame( MODULE* Module, wxDC* DC );
    void StartMove_Module( MODULE* module, wxDC* DC );

    /**
     * Function StartMoveModule
     * Initialize a drag or move pad command
     * @param aModule = the module to move or drag
     * @param aDC = the current device context
     * @param aDragConnectedTracks = true to drag connected tracks,
     *                               false to just move the module
     */
    void StartMoveModule( MODULE* aModule, wxDC* aDC, bool aDragConnectedTracks );

    /**
     * Function DlgGlobalChange_PadSettings
+1 −0
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@ set(PCBNEW_CLASS_SRCS
    netlist_reader_kicad.cpp
    onleftclick.cpp
    onrightclick.cpp
    pad_edition_functions.cpp
    pcbnew.cpp
    pcbnew_config.cpp
    pcbplot.cpp
Loading