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

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
/*
* 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.
......
......@@ -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
......
......@@ -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
......
This source diff could not be displayed because it is too large. You can view the blob instead.
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 10 2012)
// C++ code generated with wxFormBuilder (version Oct 8 2012)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
......@@ -11,6 +11,8 @@
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class DIALOG_SHIM;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
......@@ -90,6 +92,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
wxStaticText* m_PadShapeDelta_Unit;
wxStaticText* m_staticText23;
wxChoice* m_trapDeltaDirChoice;
wxStaticText* m_staticText521;
wxBoxSizer* m_DrillShapeBoxSizer;
wxStaticText* m_staticTitleModuleRot;
wxStaticText* m_staticModuleRotValue;
......@@ -132,6 +135,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
wxStaticText* m_SolderPasteRatioMarginUnits;
wxStaticText* m_staticText40;
wxChoice* m_ZoneConnectionChoice;
wxStaticText* m_staticText53;
wxStaticText* m_staticText49;
wxTextCtrl* m_ThermalWidthCtrl;
wxStaticText* m_ThermalWidthUnits;
......@@ -159,7 +163,7 @@ class DIALOG_PAD_PROPERTIES_BASE : public DIALOG_SHIM
public:
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 857,630 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER );
DIALOG_PAD_PROPERTIES_BASE( wxWindow* parent, wxWindowID id = wxID_DIALOG_EDIT_PAD, const wxString& title = _("Pad Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSUNKEN_BORDER );
~DIALOG_PAD_PROPERTIES_BASE();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment