Commit 001afa49 authored by Wayne Stambaugh's avatar Wayne Stambaugh
Browse files

Pcbnew pad properties dialog assertion and layout fixes.

* Fixed spacing issue in pad properties dialog.
* Remove wxSHAPED flag from pad drawing panel to prevent assertion in
  wxSizer.
* Used sane default pad size and drill size settings to prevent wxRound
  assertions.
* Add license to class_board_design_settings.cpp.
parent e206a1b4
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
/*
 * This program source code file is part of KiCad, a free EDA CAD application.
 *
 * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you may find one here:
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
 * or you may search the http://www.gnu.org website for the version 2 license,
 * or you may write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 */

/**
 * @file class_board_design_settings.cpp
 * BOARD_DESIGN_SETTINGS class functions.
+16 −17
Original line number Diff line number Diff line
@@ -57,9 +57,9 @@ D_PAD::D_PAD( MODULE* parent ) :
    BOARD_CONNECTED_ITEM( parent, PCB_PAD_T )
{
    m_NumPadName          = 0;

    m_Size.x = m_Size.y = 500;          // give it a reasonable size
    m_Orient = 0;                       // Pad rotation in 1/10 degrees
    m_Size.x = m_Size.y   = DMils2iu( 600 ); // Default pad size 60 mils.
    m_Drill.x = m_Drill.y = DMils2iu( 300 ); // Default drill size 30 mils.
    m_Orient              = 0;               // Pad rotation in 1/10 degrees.
    m_LengthPadToDie      = 0;

    if( m_Parent  &&  m_Parent->Type() == PCB_MODULE_T )
@@ -67,10 +67,9 @@ D_PAD::D_PAD( MODULE* parent ) :
        m_Pos = GetParent()->GetPosition();
    }

    m_PadShape = PAD_CIRCLE;            // Shape: PAD_CIRCLE, PAD_RECT PAD_OVAL
                                        // PAD_TRAPEZOID
    m_Attribute      = PAD_STANDARD;    // Type: NORMAL, PAD_SMD, PAD_CONN
    m_DrillShape     = PAD_CIRCLE;      // Drill shape = circle
    m_PadShape            = PAD_CIRCLE;      // Default pad shape is PAD_CIRCLE.
    m_Attribute           = PAD_STANDARD;    // Default pad type is NORMAL (thru hole)
    m_DrillShape          = PAD_CIRCLE;      // Default pad drill shape is a circle.
    m_LocalClearance      = 0;
    m_LocalSolderMaskMargin  = 0;
    m_LocalSolderPasteMargin = 0;
@@ -79,7 +78,7 @@ D_PAD::D_PAD( MODULE* parent ) :
    m_ThermalWidth        = 0;                // Use parent setting by default
    m_ThermalGap          = 0;                // Use parent setting by default

    // set layers mask to default for a standard pad
    // Set layers mask to default for a standard thru hole pad.
    m_layerMask           = PAD_STANDARD_DEFAULT_LAYERS;

    SetSubRatsnest( 0 );                       // used in ratsnest calculations
+1 −1
Original line number Diff line number Diff line
@@ -1015,7 +1015,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( D_PAD* aPad )
    case PAD_SMD:
        // SMD and PAD_CONN has no hole.
        // basically, SMD and PAD_CONN are same type of pads
        // PAD_CONN has just a default non technical layers that differs frm SMD
        // PAD_CONN has just a default non technical layers that differs from SMD
        // and are intended to be used in virtual edge board connectors
        // However we can accept a non null offset,
        // mainly to allow complex pads build from a set of from basic pad shapes
+117 −95

File changed.

Preview size limit exceeded, changes collapsed.

+272 −126

File changed.

Preview size limit exceeded, changes collapsed.

Loading