Eeschema: enhanced Pin editor dialog.
This commit is contained in:
parent
8e538ddd4f
commit
135a62748f
|
@ -1,4 +1,9 @@
|
|||
#include "fctsys.h"
|
||||
#include "macros.h"
|
||||
#include "gr_basic.h"
|
||||
#include "libeditframe.h"
|
||||
#include "class_libentry.h"
|
||||
#include "lib_pin.h"
|
||||
|
||||
#include "dialog_lib_edit_pin.h"
|
||||
|
||||
|
@ -7,17 +12,24 @@
|
|||
wxPoint DIALOG_LIB_EDIT_PIN::s_LastPos( -1, -1 );
|
||||
wxSize DIALOG_LIB_EDIT_PIN::s_LastSize;
|
||||
|
||||
DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent ) :
|
||||
DIALOG_LIB_EDIT_PIN::DIALOG_LIB_EDIT_PIN( wxWindow* parent, LIB_PIN* aPin ) :
|
||||
DIALOG_LIB_EDIT_PIN_BASE( parent )
|
||||
{
|
||||
m_dummyPin = new LIB_PIN( *aPin );
|
||||
m_panelShowPin->SetBackgroundColour( MakeColour( g_DrawBgColor ) );
|
||||
|
||||
/* Required to make escape key work correctly in wxGTK. */
|
||||
SetFocus();
|
||||
// Set tab order
|
||||
m_textPinName-> MoveAfterInTabOrder(this);
|
||||
m_textPadName-> MoveAfterInTabOrder(m_textPinName);
|
||||
m_sdbSizerButtonsOK->SetDefault();
|
||||
}
|
||||
|
||||
DIALOG_LIB_EDIT_PIN::~DIALOG_LIB_EDIT_PIN()
|
||||
{
|
||||
delete m_dummyPin;
|
||||
}
|
||||
|
||||
void DIALOG_LIB_EDIT_PIN::SetLastSizeAndPosition()
|
||||
{
|
||||
if( s_LastPos.x != -1 )
|
||||
|
@ -32,6 +44,37 @@ void DIALOG_LIB_EDIT_PIN::SetLastSizeAndPosition()
|
|||
Center();
|
||||
}
|
||||
|
||||
/*
|
||||
* Draw (on m_panelShowPin) the pin currently edited
|
||||
* accroding to current settings in dialog
|
||||
*/
|
||||
void DIALOG_LIB_EDIT_PIN::OnPaintShowPanel( wxPaintEvent& event )
|
||||
{
|
||||
wxPaintDC dc( m_panelShowPin );
|
||||
wxSize dc_size = dc.GetSize();
|
||||
dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
|
||||
|
||||
// Calculate a suitable scale to fit the available draw area
|
||||
EDA_RECT bBox = m_dummyPin->GetBoundingBox();
|
||||
double xscale = (double) dc_size.x / bBox.GetWidth();
|
||||
double yscale = (double) dc_size.y / bBox.GetHeight();
|
||||
double scale = MIN( xscale, yscale );
|
||||
|
||||
// Give a 10% margin
|
||||
scale *= 0.9;
|
||||
dc.SetUserScale( scale, scale );
|
||||
|
||||
wxPoint offset = bBox.Centre();
|
||||
NEGATE( offset.x );
|
||||
NEGATE( offset.y );
|
||||
|
||||
GRResetPenAndBrush( &dc );
|
||||
m_dummyPin->Draw( NULL, &dc, offset, -1, wxCOPY,
|
||||
NULL, DefaultTransform );
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void DIALOG_LIB_EDIT_PIN::OnCloseDialog( wxCloseEvent& event )
|
||||
{
|
||||
// Save the dialog's position
|
||||
|
@ -56,6 +99,26 @@ void DIALOG_LIB_EDIT_PIN::OnOKButtonClick( wxCommandEvent& event )
|
|||
EndModal( wxID_OK );
|
||||
}
|
||||
|
||||
// Called when a pin properties changes
|
||||
void DIALOG_LIB_EDIT_PIN::OnPropertiesChange( wxCommandEvent& event )
|
||||
{
|
||||
int units = ((LIB_EDIT_FRAME*)GetParent())->m_InternalUnits;
|
||||
int pinNameSize = ReturnValueFromString( g_UserUnit, GetNameTextSize(), units );
|
||||
int pinNumSize = ReturnValueFromString( g_UserUnit, GetPadNameTextSize(), units);
|
||||
int pinOrient = LIB_PIN::GetOrientationCode( GetOrientation() );
|
||||
int pinLength = ReturnValueFromString( g_UserUnit, GetLength(), units );
|
||||
int pinShape = LIB_PIN::GetStyleCode( GetStyle() );
|
||||
|
||||
m_dummyPin->SetName( GetName() );
|
||||
m_dummyPin->SetNameTextSize( pinNameSize );
|
||||
m_dummyPin->SetNumber( GetPadName() );
|
||||
m_dummyPin->SetNumberTextSize( pinNumSize );
|
||||
m_dummyPin->SetOrientation( pinOrient );
|
||||
m_dummyPin->SetLength( pinLength );
|
||||
m_dummyPin->SetShape( pinShape );
|
||||
|
||||
m_panelShowPin->Refresh();
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_LIB_EDIT_PIN::SetOrientationList( const wxArrayString& list,
|
||||
|
|
|
@ -16,14 +16,19 @@ class DIALOG_LIB_EDIT_PIN : public DIALOG_LIB_EDIT_PIN_BASE
|
|||
static wxSize s_LastSize; ///< last position and size
|
||||
static wxPoint s_LastPos;
|
||||
|
||||
LIB_PIN * m_dummyPin; // a working copy used to show changes
|
||||
|
||||
public:
|
||||
/** Constructor */
|
||||
DIALOG_LIB_EDIT_PIN( wxWindow* parent );
|
||||
DIALOG_LIB_EDIT_PIN( wxWindow* parent, LIB_PIN* aPin );
|
||||
~DIALOG_LIB_EDIT_PIN();
|
||||
|
||||
void SetLastSizeAndPosition();
|
||||
void OnCloseDialog( wxCloseEvent& event );
|
||||
void OnCancelButtonClick( wxCommandEvent& event );
|
||||
void OnOKButtonClick( wxCommandEvent& event );
|
||||
void OnPaintShowPanel( wxPaintEvent& event );
|
||||
void OnPropertiesChange( wxCommandEvent& event );
|
||||
|
||||
void SetOrientationList( const wxArrayString& list, const char *** aBitmaps );
|
||||
void SetOrientation( int orientation )
|
||||
|
|
|
@ -11,13 +11,6 @@
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BEGIN_EVENT_TABLE( DIALOG_LIB_EDIT_PIN_BASE, wxDialog )
|
||||
EVT_CLOSE( DIALOG_LIB_EDIT_PIN_BASE::_wxFB_OnCloseDialog )
|
||||
EVT_CHECKBOX( wxID_ANY, DIALOG_LIB_EDIT_PIN_BASE::_wxFB_OnCBpartSelection )
|
||||
EVT_BUTTON( wxID_CANCEL, DIALOG_LIB_EDIT_PIN_BASE::_wxFB_OnCancelButtonClick )
|
||||
EVT_BUTTON( wxID_OK, DIALOG_LIB_EDIT_PIN_BASE::_wxFB_OnOKButtonClick )
|
||||
END_EVENT_TABLE()
|
||||
|
||||
DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
|
||||
{
|
||||
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
||||
|
@ -25,135 +18,140 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
|
|||
wxBoxSizer* mainSizer;
|
||||
mainSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizer1;
|
||||
fgSizer1 = new wxFlexGridSizer( 5, 6, 0, 0 );
|
||||
fgSizer1->AddGrowableCol( 1 );
|
||||
fgSizer1->AddGrowableCol( 4 );
|
||||
fgSizer1->SetFlexibleDirection( wxBOTH );
|
||||
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
|
||||
wxBoxSizer* bUpperSizer;
|
||||
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxBoxSizer* bLeftSizer;
|
||||
bLeftSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerPins;
|
||||
fgSizerPins = new wxFlexGridSizer( 5, 2, 0, 0 );
|
||||
fgSizerPins->AddGrowableCol( 1 );
|
||||
fgSizerPins->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerPins->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
|
||||
|
||||
m_staticTextPinName = new wxStaticText( this, wxID_ANY, _("Pin &name:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPinName->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextPinName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
fgSizerPins->Add( m_staticTextPinName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_textPinName = new wxTextCtrl( this, ID_M_TEXTPINNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_textPinName, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 );
|
||||
|
||||
m_staticTextNameSize = new wxStaticText( this, wxID_ANY, _("N&ame text size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextNameSize->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextNameSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_textPinNameTextSize = new wxTextCtrl( this, ID_M_TEXTPINNAMETEXTSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_textPinNameTextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_staticNameTextSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticNameTextSizeUnits->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticNameTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
fgSizerPins->Add( m_textPinName, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_staticTextPadName = new wxStaticText( this, ID_M_STATICTEXTPADNAME, _("Pin n&umber:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPadName->Wrap( -1 );
|
||||
m_staticTextPadName->SetToolTip( _("Pin number: 1 to 4 ASCII letters and/or digits") );
|
||||
|
||||
fgSizer1->Add( m_staticTextPadName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
fgSizerPins->Add( m_staticTextPadName, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_textPadName = new wxTextCtrl( this, ID_M_TEXTPADNAME, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_textPadName, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 );
|
||||
|
||||
m_staticTextPadNameSize = new wxStaticText( this, wxID_ANY, _("Number te&xt size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPadNameSize->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextPadNameSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_textPadNameTextSize = new wxTextCtrl( this, ID_M_TEXTPADNAMETEXTSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_textPadNameTextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_staticNumberTextSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticNumberTextSizeUnits->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticNumberTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
fgSizerPins->Add( m_textPadName, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_staticTextOrient = new wxStaticText( this, wxID_ANY, _("&Orientation:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextOrient->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextOrient, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
fgSizerPins->Add( m_staticTextOrient, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_choiceOrientation = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
fgSizer1->Add( m_choiceOrientation, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 15, 0, 1, wxEXPAND, 3 );
|
||||
|
||||
m_staticTextPinLen = new wxStaticText( this, ID_M_STATICTEXTPINLEN, _("&Length:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPinLen->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextPinLen, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_textLength = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizer1->Add( m_textLength, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_staticLengthUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticLengthUnits->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticLengthUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
fgSizerPins->Add( m_choiceOrientation, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_staticTextEType = new wxStaticText( this, wxID_ANY, _("&Electrical type:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextEType->Wrap( -1 );
|
||||
m_staticTextEType->SetToolTip( _("Used by the ERC.") );
|
||||
|
||||
fgSizer1->Add( m_staticTextEType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
fgSizerPins->Add( m_staticTextEType, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_choiceElectricalType = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
fgSizer1->Add( m_choiceElectricalType, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 0, wxEXPAND, 3 );
|
||||
fgSizerPins->Add( m_choiceElectricalType, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
m_staticTextGstyle = new wxStaticText( this, wxID_ANY, _("Graphic &Style:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextGstyle->Wrap( -1 );
|
||||
fgSizer1->Add( m_staticTextGstyle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
fgSizerPins->Add( m_staticTextGstyle, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_choiceStyle = new wxBitmapComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
fgSizer1->Add( m_choiceStyle, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
fgSizerPins->Add( m_choiceStyle, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 3 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||
|
||||
mainSizer->Add( fgSizer1, 1, wxALL|wxEXPAND, 12 );
|
||||
bLeftSizer->Add( fgSizerPins, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* boarderSizer;
|
||||
boarderSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerPinSharing;
|
||||
sbSizerPinSharing = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Pin Sharing") ), wxVERTICAL );
|
||||
|
||||
m_checkApplyToAllParts = new wxCheckBox( this, wxID_ANY, _("Add to all &parts in package"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
boarderSizer->Add( m_checkApplyToAllParts, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
m_checkApplyToAllParts->SetValue(true);
|
||||
sbSizerPinSharing->Add( m_checkApplyToAllParts, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_checkApplyToAllConversions = new wxCheckBox( this, wxID_ANY, _("Add to all alternate &body styles (DeMorgan)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
boarderSizer->Add( m_checkApplyToAllConversions, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
sbSizerPinSharing->Add( m_checkApplyToAllConversions, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
boarderSizer->Add( sbSizerPinSharing, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerSchematicProperties;
|
||||
sbSizerSchematicProperties = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Schematic Properties") ), wxVERTICAL );
|
||||
|
||||
m_checkShow = new wxCheckBox( this, wxID_ANY, _("&Visible"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_checkShow->SetValue(true);
|
||||
boarderSizer->Add( m_checkShow, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
sbSizerSchematicProperties->Add( m_checkShow, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
boarderSizer->Add( sbSizerSchematicProperties, 0, wxEXPAND|wxALL, 5 );
|
||||
|
||||
boarderSizer->Add( 0, 5, 0, wxALL|wxEXPAND, 10 );
|
||||
bLeftSizer->Add( boarderSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 12 );
|
||||
|
||||
bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
wxBoxSizer* bRightSizer;
|
||||
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxFlexGridSizer* fgSizerTextsSizes;
|
||||
fgSizerTextsSizes = new wxFlexGridSizer( 3, 3, 0, 0 );
|
||||
fgSizerTextsSizes->AddGrowableCol( 1 );
|
||||
fgSizerTextsSizes->SetFlexibleDirection( wxBOTH );
|
||||
fgSizerTextsSizes->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_ALL );
|
||||
|
||||
m_staticTextNameSize = new wxStaticText( this, ID_M_STATICTEXTNAMESIZE, _("N&ame text size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextNameSize->Wrap( -1 );
|
||||
fgSizerTextsSizes->Add( m_staticTextNameSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_textPinNameTextSize = new wxTextCtrl( this, ID_M_TEXTPINNAMETEXTSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerTextsSizes->Add( m_textPinNameTextSize, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM, 3 );
|
||||
|
||||
m_staticNameTextSizeUnits = new wxStaticText( this, ID_M_STATICNAMETEXTSIZEUNITS, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticNameTextSizeUnits->Wrap( -1 );
|
||||
fgSizerTextsSizes->Add( m_staticNameTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_staticTextPadNameSize = new wxStaticText( this, ID_M_STATICTEXTPADNAMESIZE, _("Number te&xt size:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPadNameSize->Wrap( -1 );
|
||||
fgSizerTextsSizes->Add( m_staticTextPadNameSize, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_textPadNameTextSize = new wxTextCtrl( this, ID_M_TEXTPADNAMETEXTSIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerTextsSizes->Add( m_textPadNameTextSize, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxEXPAND, 3 );
|
||||
|
||||
m_staticNumberTextSizeUnits = new wxStaticText( this, ID_M_STATICNUMBERTEXTSIZEUNITS, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticNumberTextSizeUnits->Wrap( -1 );
|
||||
fgSizerTextsSizes->Add( m_staticNumberTextSizeUnits, 0, wxALIGN_CENTER_VERTICAL|wxALL, 3 );
|
||||
|
||||
m_staticTextPinLen = new wxStaticText( this, ID_M_STATICTEXTPINLEN, _("&Length:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextPinLen->Wrap( -1 );
|
||||
fgSizerTextsSizes->Add( m_staticTextPinLen, 0, wxALL, 5 );
|
||||
|
||||
m_textLength = new wxTextCtrl( this, ID_M_TEXTLENGTH, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
fgSizerTextsSizes->Add( m_textLength, 0, wxTOP|wxBOTTOM|wxEXPAND, 5 );
|
||||
|
||||
m_staticLengthUnits = new wxStaticText( this, ID_M_STATICLENGTHUNITS, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticLengthUnits->Wrap( -1 );
|
||||
fgSizerTextsSizes->Add( m_staticLengthUnits, 0, wxALL, 5 );
|
||||
|
||||
bRightSizer->Add( fgSizerTextsSizes, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_panelShowPin = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE|wxSUNKEN_BORDER|wxTAB_TRAVERSAL );
|
||||
bRightSizer->Add( m_panelShowPin, 1, wxEXPAND | wxALL, 5 );
|
||||
|
||||
bUpperSizer->Add( bRightSizer, 1, wxEXPAND|wxRIGHT, 5 );
|
||||
|
||||
mainSizer->Add( bUpperSizer, 1, wxEXPAND, 5 );
|
||||
|
||||
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
||||
boarderSizer->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
mainSizer->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_sdbSizerButtons = new wxStdDialogButtonSizer();
|
||||
m_sdbSizerButtonsOK = new wxButton( this, wxID_OK );
|
||||
|
@ -161,16 +159,44 @@ DIALOG_LIB_EDIT_PIN_BASE::DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID
|
|||
m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL );
|
||||
m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel );
|
||||
m_sdbSizerButtons->Realize();
|
||||
boarderSizer->Add( m_sdbSizerButtons, 0, wxALL|wxALIGN_RIGHT, 0 );
|
||||
|
||||
mainSizer->Add( boarderSizer, 0, wxALL|wxEXPAND, 12 );
|
||||
mainSizer->Add( m_sdbSizerButtons, 0, wxALL|wxALIGN_RIGHT, 5 );
|
||||
|
||||
this->SetSizer( mainSizer );
|
||||
this->Layout();
|
||||
|
||||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnCloseDialog ) );
|
||||
m_textPinName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_textPadName->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_choiceOrientation->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_choiceElectricalType->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_choiceStyle->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_checkApplyToAllConversions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnCBpartSelection ), NULL, this );
|
||||
m_textPinNameTextSize->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_textPadNameTextSize->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_textLength->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_panelShowPin->Connect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPaintShowPanel ), NULL, this );
|
||||
m_sdbSizerButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnCancelButtonClick ), NULL, this );
|
||||
m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnOKButtonClick ), NULL, this );
|
||||
}
|
||||
|
||||
DIALOG_LIB_EDIT_PIN_BASE::~DIALOG_LIB_EDIT_PIN_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnCloseDialog ) );
|
||||
m_textPinName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_textPadName->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_choiceOrientation->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_choiceElectricalType->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_choiceStyle->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_checkApplyToAllConversions->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnCBpartSelection ), NULL, this );
|
||||
m_textPinNameTextSize->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_textPadNameTextSize->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_textLength->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPropertiesChange ), NULL, this );
|
||||
m_panelShowPin->Disconnect( wxEVT_PAINT, wxPaintEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnPaintShowPanel ), NULL, this );
|
||||
m_sdbSizerButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnCancelButtonClick ), NULL, this );
|
||||
m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_BASE::OnOKButtonClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -22,6 +22,8 @@ class wxBitmapComboBox;
|
|||
#include <wx/combobox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/statline.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/dialog.h>
|
||||
|
@ -33,60 +35,48 @@ class wxBitmapComboBox;
|
|||
///////////////////////////////////////////////////////////////////////////////
|
||||
class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog
|
||||
{
|
||||
DECLARE_EVENT_TABLE()
|
||||
private:
|
||||
|
||||
// Private event handlers
|
||||
void _wxFB_OnCloseDialog( wxCloseEvent& event ){ OnCloseDialog( event ); }
|
||||
void _wxFB_OnCBpartSelection( wxCommandEvent& event ){ OnCBpartSelection( event ); }
|
||||
void _wxFB_OnCancelButtonClick( wxCommandEvent& event ){ OnCancelButtonClick( event ); }
|
||||
void _wxFB_OnOKButtonClick( wxCommandEvent& event ){ OnOKButtonClick( event ); }
|
||||
|
||||
|
||||
protected:
|
||||
enum
|
||||
{
|
||||
ID_M_TEXTPINNAME = 1000,
|
||||
ID_M_TEXTPINNAMETEXTSIZE,
|
||||
ID_M_STATICTEXTPADNAME,
|
||||
ID_M_TEXTPADNAME,
|
||||
ID_M_STATICTEXTNAMESIZE,
|
||||
ID_M_TEXTPINNAMETEXTSIZE,
|
||||
ID_M_STATICNAMETEXTSIZEUNITS,
|
||||
ID_M_STATICTEXTPADNAMESIZE,
|
||||
ID_M_TEXTPADNAMETEXTSIZE,
|
||||
ID_M_STATICNUMBERTEXTSIZEUNITS,
|
||||
ID_M_STATICTEXTPINLEN,
|
||||
ID_M_TEXTLENGTH,
|
||||
ID_M_STATICLENGTHUNITS,
|
||||
};
|
||||
|
||||
wxStaticText* m_staticTextPinName;
|
||||
wxTextCtrl* m_textPinName;
|
||||
|
||||
wxStaticText* m_staticTextNameSize;
|
||||
wxTextCtrl* m_textPinNameTextSize;
|
||||
wxStaticText* m_staticNameTextSizeUnits;
|
||||
wxStaticText* m_staticTextPadName;
|
||||
wxTextCtrl* m_textPadName;
|
||||
|
||||
wxStaticText* m_staticTextPadNameSize;
|
||||
wxTextCtrl* m_textPadNameTextSize;
|
||||
wxStaticText* m_staticNumberTextSizeUnits;
|
||||
wxStaticText* m_staticTextOrient;
|
||||
wxBitmapComboBox* m_choiceOrientation;
|
||||
|
||||
wxStaticText* m_staticTextPinLen;
|
||||
wxTextCtrl* m_textLength;
|
||||
wxStaticText* m_staticLengthUnits;
|
||||
wxStaticText* m_staticTextEType;
|
||||
wxBitmapComboBox* m_choiceElectricalType;
|
||||
|
||||
|
||||
|
||||
|
||||
wxStaticText* m_staticTextGstyle;
|
||||
wxBitmapComboBox* m_choiceStyle;
|
||||
|
||||
|
||||
|
||||
wxCheckBox* m_checkApplyToAllParts;
|
||||
wxCheckBox* m_checkApplyToAllConversions;
|
||||
wxCheckBox* m_checkShow;
|
||||
|
||||
wxStaticText* m_staticTextNameSize;
|
||||
wxTextCtrl* m_textPinNameTextSize;
|
||||
wxStaticText* m_staticNameTextSizeUnits;
|
||||
wxStaticText* m_staticTextPadNameSize;
|
||||
wxTextCtrl* m_textPadNameTextSize;
|
||||
wxStaticText* m_staticNumberTextSizeUnits;
|
||||
wxStaticText* m_staticTextPinLen;
|
||||
wxTextCtrl* m_textLength;
|
||||
wxStaticText* m_staticLengthUnits;
|
||||
wxPanel* m_panelShowPin;
|
||||
wxStaticLine* m_staticline1;
|
||||
wxStdDialogButtonSizer* m_sdbSizerButtons;
|
||||
wxButton* m_sdbSizerButtonsOK;
|
||||
|
@ -94,14 +84,16 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog
|
|||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnPropertiesChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnCBpartSelection( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnPaintShowPanel( wxPaintEvent& event ) { event.Skip(); }
|
||||
virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
||||
DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 487,344 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
DIALOG_LIB_EDIT_PIN_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pin Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 499,372 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_LIB_EDIT_PIN_BASE();
|
||||
|
||||
};
|
||||
|
|
|
@ -319,7 +319,7 @@ void LIB_ARC::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
|||
* Function GetPenSize
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int LIB_ARC::GetPenSize()
|
||||
int LIB_ARC::GetPenSize() const
|
||||
{
|
||||
return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
|
||||
}
|
||||
|
|
|
@ -102,7 +102,7 @@ public:
|
|||
/**
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
virtual int GetPenSize( );
|
||||
virtual int GetPenSize( ) const;
|
||||
|
||||
/**
|
||||
* See LIB_DRAW_ITEM::BeginEdit().
|
||||
|
|
|
@ -236,7 +236,7 @@ void LIB_BEZIER::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
|||
* Function GetPenSize
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int LIB_BEZIER::GetPenSize()
|
||||
int LIB_BEZIER::GetPenSize() const
|
||||
{
|
||||
return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
/**
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
virtual int GetPenSize( );
|
||||
virtual int GetPenSize( ) const;
|
||||
|
||||
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ void LIB_CIRCLE::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
|
|||
* Function GetPenSize
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int LIB_CIRCLE::GetPenSize()
|
||||
int LIB_CIRCLE::GetPenSize() const
|
||||
{
|
||||
return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
/**
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
virtual int GetPenSize( );
|
||||
virtual int GetPenSize( ) const;
|
||||
|
||||
virtual EDA_RECT GetBoundingBox() const;
|
||||
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
|
||||
|
|
|
@ -185,7 +185,7 @@ public:
|
|||
/**
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
virtual int GetPenSize() = 0;
|
||||
virtual int GetPenSize() const = 0;
|
||||
|
||||
/**
|
||||
* Write draw item object to \a aFile in "*.lib" format.
|
||||
|
|
|
@ -272,7 +272,7 @@ bool LIB_FIELD::Load( char* line, wxString& errorMsg )
|
|||
* Function GetPenSize
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int LIB_FIELD::GetPenSize()
|
||||
int LIB_FIELD::GetPenSize() const
|
||||
{
|
||||
return ( m_Thickness == 0 ) ? g_DrawDefaultLineThickness : m_Thickness;
|
||||
}
|
||||
|
|
|
@ -86,10 +86,10 @@ public:
|
|||
void SetId( int aId ) { m_id = aId; }
|
||||
|
||||
/**
|
||||
* Function GetPenSize virtual pure
|
||||
* Function GetPenSize virtual
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int GetPenSize( );
|
||||
virtual int GetPenSize( ) const;
|
||||
|
||||
/**
|
||||
* Writes field object out to a FILE in "*.lib" format.
|
||||
|
|
|
@ -34,9 +34,10 @@ static const wxString pin_orientation_names[] =
|
|||
_( "Up" ),
|
||||
_( "Down" )
|
||||
};
|
||||
|
||||
// bitmaps to show pins orientations in dialog editor
|
||||
// must have same order than pin_orientation_names
|
||||
static const char ** s_icons_Pins_Orientations[] =
|
||||
static const char** s_icons_Pins_Orientations[] =
|
||||
{
|
||||
pinorient_right_xpm,
|
||||
pinorient_left_xpm,
|
||||
|
@ -72,7 +73,7 @@ static const wxString pin_style_names[] =
|
|||
|
||||
// bitmaps to show pins shapes in dialog editor
|
||||
// must have same order than pin_style_names
|
||||
static const char ** s_icons_Pins_Shapes[] =
|
||||
static const char** s_icons_Pins_Shapes[] =
|
||||
{
|
||||
pinshape_normal_xpm,
|
||||
pinshape_invert_xpm,
|
||||
|
@ -120,7 +121,7 @@ static const wxString pin_electrical_type_names[] =
|
|||
|
||||
// bitmaps to show pins electrical type in dialog editor
|
||||
// must have same order than pin_electrical_type_names
|
||||
static const char ** s_icons_Pins_Electrical_Type[] =
|
||||
static const char** s_icons_Pins_Electrical_Type[] =
|
||||
{
|
||||
pintype_input_xpm,
|
||||
pintype_output_xpm,
|
||||
|
@ -160,7 +161,7 @@ extern void PlotPinSymbol( PLOTTER* plotter, const wxPoint& pos,
|
|||
int len, int orient, int Shape );
|
||||
|
||||
|
||||
LIB_PIN::LIB_PIN( LIB_COMPONENT * aParent ) :
|
||||
LIB_PIN::LIB_PIN( LIB_COMPONENT* aParent ) :
|
||||
LIB_DRAW_ITEM( LIB_PIN_T, aParent )
|
||||
{
|
||||
m_length = 300; /* default Pin len */
|
||||
|
@ -203,6 +204,7 @@ LIB_PIN::LIB_PIN( const LIB_PIN& pin ) : LIB_DRAW_ITEM( pin )
|
|||
void LIB_PIN::SetName( const wxString& aName )
|
||||
{
|
||||
wxString tmp = ( aName.IsEmpty() ) ? wxT( "~" ) : aName;
|
||||
|
||||
tmp.Replace( wxT( " " ), wxT( "_" ) );
|
||||
|
||||
if( m_name != tmp )
|
||||
|
@ -256,6 +258,7 @@ void LIB_PIN::SetNameTextSize( int size )
|
|||
void LIB_PIN::SetNumber( const wxString& number )
|
||||
{
|
||||
wxString tmp = ( number.IsEmpty() ) ? wxT( "~" ) : number;
|
||||
|
||||
tmp.Replace( wxT( " " ), wxT( "_" ) );
|
||||
long oldNumber = m_number;
|
||||
SetPinNumFromString( tmp );
|
||||
|
@ -780,7 +783,7 @@ bool LIB_PIN::Load( char* line, wxString& errorMsg )
|
|||
* Function GetPenSize
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int LIB_PIN::GetPenSize()
|
||||
int LIB_PIN::GetPenSize() const
|
||||
{
|
||||
return ( m_width == 0 ) ? g_DrawDefaultLineThickness : m_width;
|
||||
}
|
||||
|
@ -831,10 +834,10 @@ void LIB_PIN::drawGraphic( EDA_DRAW_PANEL* aPanel,
|
|||
/* Set to one (1) to draw bounding box around pin to validate bounding
|
||||
* box calculation. */
|
||||
#if 0
|
||||
EDA_RECT* clipbox = aPanel ? &aPanel->m_ClipBox : NULL;
|
||||
EDA_RECT bBox = GetBoundingBox();
|
||||
bBox.Inflate( 5, 5 );
|
||||
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
|
||||
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
|
||||
bBox.Move( aOffset );
|
||||
GRRect( clipbox, aDC, bBox, 0, LIGHTMAGENTA );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -853,9 +856,9 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
{
|
||||
int MapX1, MapY1, x1, y1;
|
||||
int color;
|
||||
int width = GetPenSize( );
|
||||
int width = GetPenSize();
|
||||
int posX = aPinPos.x, posY = aPinPos.y, len = m_length;
|
||||
BASE_SCREEN* screen = aPanel->GetScreen();
|
||||
EDA_RECT* clipbox = aPanel ? &aPanel->m_ClipBox : NULL;
|
||||
|
||||
color = ReturnLayerColor( LAYER_PIN );
|
||||
|
||||
|
@ -898,25 +901,25 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
|
||||
if( m_shape & INVERT )
|
||||
{
|
||||
GRCircle( &aPanel->m_ClipBox, aDC, MapX1 * INVERT_PIN_RADIUS + x1,
|
||||
GRCircle( clipbox, aDC, MapX1 * INVERT_PIN_RADIUS + x1,
|
||||
MapY1 * INVERT_PIN_RADIUS + y1,
|
||||
INVERT_PIN_RADIUS, width, color );
|
||||
|
||||
GRMoveTo( MapX1 * INVERT_PIN_RADIUS * 2 + x1,
|
||||
MapY1 * INVERT_PIN_RADIUS * 2 + y1 );
|
||||
GRLineTo( &aPanel->m_ClipBox, aDC, posX, posY, width, color );
|
||||
GRLineTo( clipbox, aDC, posX, posY, width, color );
|
||||
}
|
||||
else if( m_shape & CLOCK_FALL ) /* an alternative for Inverted Clock */
|
||||
{
|
||||
GRMoveTo( x1 + MapY1 * CLOCK_PIN_DIM,
|
||||
y1 - MapX1 * CLOCK_PIN_DIM );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1 + MapX1 * CLOCK_PIN_DIM,
|
||||
y1 + MapY1 * CLOCK_PIN_DIM,
|
||||
width,
|
||||
color );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1 - MapY1 * CLOCK_PIN_DIM,
|
||||
y1 + MapX1 * CLOCK_PIN_DIM,
|
||||
|
@ -924,12 +927,12 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
color );
|
||||
GRMoveTo( MapX1 * CLOCK_PIN_DIM + x1,
|
||||
MapY1 * CLOCK_PIN_DIM + y1 );
|
||||
GRLineTo( &aPanel->m_ClipBox, aDC, posX, posY, width, color );
|
||||
GRLineTo( clipbox, aDC, posX, posY, width, color );
|
||||
}
|
||||
else
|
||||
{
|
||||
GRMoveTo( x1, y1 );
|
||||
GRLineTo( &aPanel->m_ClipBox, aDC, posX, posY, width, color );
|
||||
GRLineTo( clipbox, aDC, posX, posY, width, color );
|
||||
}
|
||||
|
||||
if( m_shape & CLOCK )
|
||||
|
@ -937,13 +940,13 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
if( MapY1 == 0 ) /* MapX1 = +- 1 */
|
||||
{
|
||||
GRMoveTo( x1, y1 + CLOCK_PIN_DIM );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1 - MapX1 * CLOCK_PIN_DIM,
|
||||
y1,
|
||||
width,
|
||||
color );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1,
|
||||
y1 - CLOCK_PIN_DIM,
|
||||
|
@ -953,13 +956,13 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
else /* MapX1 = 0 */
|
||||
{
|
||||
GRMoveTo( x1 + CLOCK_PIN_DIM, y1 );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1,
|
||||
y1 - MapY1 * CLOCK_PIN_DIM,
|
||||
width,
|
||||
color );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1 - CLOCK_PIN_DIM,
|
||||
y1,
|
||||
|
@ -973,20 +976,20 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
if( MapY1 == 0 ) /* MapX1 = +- 1 */
|
||||
{
|
||||
GRMoveTo( x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2, y1 );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2,
|
||||
y1 - IEEE_SYMBOL_PIN_DIM,
|
||||
width,
|
||||
color );
|
||||
GRLineTo( &aPanel->m_ClipBox, aDC, x1, y1, width, color );
|
||||
GRLineTo( clipbox, aDC, x1, y1, width, color );
|
||||
}
|
||||
else /* MapX1 = 0 */
|
||||
{
|
||||
GRMoveTo( x1, y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2 );
|
||||
GRLineTo( &aPanel->m_ClipBox, aDC, x1 - IEEE_SYMBOL_PIN_DIM,
|
||||
GRLineTo( clipbox, aDC, x1 - IEEE_SYMBOL_PIN_DIM,
|
||||
y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2, width, color );
|
||||
GRLineTo( &aPanel->m_ClipBox, aDC, x1, y1, width, color );
|
||||
GRLineTo( clipbox, aDC, x1, y1, width, color );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -996,7 +999,7 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
if( MapY1 == 0 ) /* MapX1 = +- 1 */
|
||||
{
|
||||
GRMoveTo( x1, y1 - IEEE_SYMBOL_PIN_DIM );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1 + MapX1 * IEEE_SYMBOL_PIN_DIM * 2,
|
||||
y1,
|
||||
|
@ -1006,7 +1009,7 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
else /* MapX1 = 0 */
|
||||
{
|
||||
GRMoveTo( x1 - IEEE_SYMBOL_PIN_DIM, y1 );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1,
|
||||
y1 + MapY1 * IEEE_SYMBOL_PIN_DIM * 2,
|
||||
|
@ -1018,7 +1021,7 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
{
|
||||
GRMoveTo( x1 - (MapX1 + MapY1) * NONLOGIC_PIN_DIM,
|
||||
y1 - (MapY1 - MapX1) * NONLOGIC_PIN_DIM );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1 + (MapX1 + MapY1) * NONLOGIC_PIN_DIM,
|
||||
y1 + (MapY1 - MapX1) * NONLOGIC_PIN_DIM,
|
||||
|
@ -1026,7 +1029,7 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
color );
|
||||
GRMoveTo( x1 - (MapX1 - MapY1) * NONLOGIC_PIN_DIM,
|
||||
y1 - (MapY1 + MapX1) * NONLOGIC_PIN_DIM );
|
||||
GRLineTo( &aPanel->m_ClipBox,
|
||||
GRLineTo( clipbox,
|
||||
aDC,
|
||||
x1 + (MapX1 - MapY1) * NONLOGIC_PIN_DIM,
|
||||
y1 + (MapY1 + MapX1) * NONLOGIC_PIN_DIM,
|
||||
|
@ -1036,23 +1039,24 @@ void LIB_PIN::DrawPinSymbol( EDA_DRAW_PANEL* aPanel,
|
|||
|
||||
/* Draw the pin end target (active end of the pin)
|
||||
*/
|
||||
BASE_SCREEN* screen = aPanel ? aPanel->GetScreen() : NULL;
|
||||
#define NCSYMB_PIN_DIM TARGET_PIN_DIAM
|
||||
if( m_type == PIN_NC ) // Draw a N.C. symbol
|
||||
{
|
||||
GRLine( &aPanel->m_ClipBox, aDC,
|
||||
posX-NCSYMB_PIN_DIM, posY-NCSYMB_PIN_DIM,
|
||||
posX+NCSYMB_PIN_DIM, posY+NCSYMB_PIN_DIM,
|
||||
width, color);
|
||||
GRLine( &aPanel->m_ClipBox, aDC,
|
||||
posX+NCSYMB_PIN_DIM, posY-NCSYMB_PIN_DIM,
|
||||
posX-NCSYMB_PIN_DIM, posY+NCSYMB_PIN_DIM,
|
||||
width, color);
|
||||
GRLine( clipbox, aDC,
|
||||
posX - NCSYMB_PIN_DIM, posY - NCSYMB_PIN_DIM,
|
||||
posX + NCSYMB_PIN_DIM, posY + NCSYMB_PIN_DIM,
|
||||
width, color );
|
||||
GRLine( clipbox, aDC,
|
||||
posX + NCSYMB_PIN_DIM, posY - NCSYMB_PIN_DIM,
|
||||
posX - NCSYMB_PIN_DIM, posY + NCSYMB_PIN_DIM,
|
||||
width, color );
|
||||
}
|
||||
/* Draw but do not print the pin end target 1 pixel width
|
||||
*/
|
||||
else if( !screen->m_IsPrinting )
|
||||
else if( screen == NULL || !screen->m_IsPrinting )
|
||||
{
|
||||
GRCircle( &aPanel->m_ClipBox, aDC, posX, posY, TARGET_PIN_DIAM, 0, color );
|
||||
GRCircle( clipbox, aDC, posX, posY, TARGET_PIN_DIAM, 0, color );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1083,10 +1087,10 @@ void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel,
|
|||
wxSize PinNameSize( m_PinNameSize, m_PinNameSize );
|
||||
wxSize PinNumSize( m_PinNumSize, m_PinNumSize );
|
||||
|
||||
int nameLineWidth = GetPenSize( );
|
||||
int nameLineWidth = GetPenSize();
|
||||
|
||||
nameLineWidth = Clamp_Text_PenSize( nameLineWidth, m_PinNameSize, false );
|
||||
int numLineWidth = GetPenSize( );
|
||||
int numLineWidth = GetPenSize();
|
||||
numLineWidth = Clamp_Text_PenSize( numLineWidth, m_PinNumSize, false );
|
||||
|
||||
GRSetDrawMode( DC, DrawMode );
|
||||
|
@ -1278,7 +1282,7 @@ void LIB_PIN::DrawPinTexts( EDA_DRAW_PANEL* panel,
|
|||
* If TextInside then the text is been put inside (moving from x1, y1 in *
|
||||
* the opposite direction to x2,y2), otherwise all is drawn outside. *
|
||||
*****************************************************************************/
|
||||
void LIB_PIN::PlotPinTexts( PLOTTER *plotter,
|
||||
void LIB_PIN::PlotPinTexts( PLOTTER* plotter,
|
||||
wxPoint& pin_pos,
|
||||
int orient,
|
||||
int TextInside,
|
||||
|
@ -1626,7 +1630,7 @@ int LIB_PIN::DoCompare( const LIB_DRAW_ITEM& other ) const
|
|||
{
|
||||
wxASSERT( other.Type() == LIB_PIN_T );
|
||||
|
||||
const LIB_PIN* tmp = ( LIB_PIN* ) &other;
|
||||
const LIB_PIN* tmp = (LIB_PIN*) &other;
|
||||
|
||||
if( m_number != tmp->m_number )
|
||||
return m_number - tmp->m_number;
|
||||
|
@ -1734,7 +1738,7 @@ void LIB_PIN::DisplayInfo( EDA_DRAW_FRAME* frame )
|
|||
frame->AppendMsgPanel( _( "Type" ),
|
||||
wxGetTranslation( pin_electrical_type_names[ m_type ] ),
|
||||
RED );
|
||||
Text = wxGetTranslation(pin_style_names[ GetStyleCodeIndex( m_shape ) ]);
|
||||
Text = wxGetTranslation( pin_style_names[ GetStyleCodeIndex( m_shape ) ] );
|
||||
frame->AppendMsgPanel( _( "Style" ), Text, BLUE );
|
||||
if( IsVisible() )
|
||||
Text = _( "Yes" );
|
||||
|
@ -1746,7 +1750,7 @@ void LIB_PIN::DisplayInfo( EDA_DRAW_FRAME* frame )
|
|||
Text = ReturnStringFromValue( g_UserUnit, m_length, EESCHEMA_INTERNAL_UNIT, true );
|
||||
frame->AppendMsgPanel( _( "Length" ), Text, MAGENTA );
|
||||
|
||||
Text = wxGetTranslation(pin_orientation_names[ GetOrientationCodeIndex( m_orientation ) ]);
|
||||
Text = wxGetTranslation( pin_orientation_names[ GetOrientationCodeIndex( m_orientation ) ] );
|
||||
frame->AppendMsgPanel( _( "Orientation" ), Text, DARKMAGENTA );
|
||||
}
|
||||
|
||||
|
@ -1754,14 +1758,83 @@ void LIB_PIN::DisplayInfo( EDA_DRAW_FRAME* frame )
|
|||
/**
|
||||
* Function GetBoundingBox
|
||||
* @return the boundary box for this, in schematic coordinates
|
||||
* for a not rotated, not mirrored component
|
||||
*/
|
||||
EDA_RECT LIB_PIN::GetBoundingBox() const
|
||||
{
|
||||
wxPoint pt = m_position;
|
||||
LIB_COMPONENT* entry = (LIB_COMPONENT*) m_Parent;
|
||||
EDA_RECT bbox;
|
||||
wxPoint begin;
|
||||
wxPoint end;
|
||||
int pinname_offset = 0;
|
||||
|
||||
pt.y *= -1; // Reverse the Y axis, according to the schematic orientation
|
||||
if( entry )
|
||||
pinname_offset = entry->GetPinNameOffset();
|
||||
|
||||
return EDA_RECT( pt, wxSize( 1, 1 ) );
|
||||
// First, calculate boundary box corners position
|
||||
int pinnum_len = m_PinNumSize * GetNumberString().Len();
|
||||
|
||||
// Actual text height are bigger than text size
|
||||
int pinname_hight = wxRound( m_PinNameSize * 1.3 );
|
||||
int pinnum_hight = wxRound( m_PinNumSize * 1.3 );
|
||||
|
||||
// calculate top left corner position
|
||||
// for the default pin orientation (PIN_RIGHT)
|
||||
begin.y = pinnum_hight + TXTMARGE;
|
||||
begin.x = MIN( -TARGET_PIN_DIAM, m_length - pinnum_len / 2 );
|
||||
|
||||
// calculate bottom right corner position and adjust top left corner position
|
||||
int pinname_len = m_PinNameSize * m_name.Len();
|
||||
if( pinname_offset )
|
||||
{
|
||||
end.y = -pinname_hight / 2;
|
||||
end.x = m_length + pinname_offset + pinname_len;
|
||||
}
|
||||
else
|
||||
{
|
||||
end.y = -pinname_hight - TXTMARGE;
|
||||
end.x = MAX( m_length, pinname_len / 2 );
|
||||
begin.x = MIN( begin.x, m_length - pinname_len / 2 );
|
||||
}
|
||||
|
||||
// Now, calculate boundary box corners position for the actual pin orientation
|
||||
switch( m_orientation )
|
||||
{
|
||||
case PIN_UP:
|
||||
|
||||
// Pin is rotated and texts positions are mirrored
|
||||
RotatePoint( &begin, wxPoint( 0, 0 ), -900 );
|
||||
RotatePoint( &end, wxPoint( 0, 0 ), -900 );
|
||||
break;
|
||||
|
||||
case PIN_DOWN:
|
||||
RotatePoint( &begin, wxPoint( 0, 0 ), 900 );
|
||||
RotatePoint( &end, wxPoint( 0, 0 ), 900 );
|
||||
NEGATE( begin.x );
|
||||
NEGATE( end.x );
|
||||
break;
|
||||
|
||||
case PIN_LEFT:
|
||||
|
||||
// Pin is mirrored, not rotated by 180.0 degrees
|
||||
NEGATE( begin.x );
|
||||
NEGATE( end.x );
|
||||
break;
|
||||
|
||||
case PIN_RIGHT:
|
||||
break;
|
||||
}
|
||||
|
||||
bbox.SetOrigin( m_position + begin );
|
||||
bbox.SetEnd( m_position + end );
|
||||
bbox.Inflate( GetPenSize() / 2 );
|
||||
|
||||
NEGATE( bbox.m_Pos.y ); // Reverse the Y axis, according to the schematic orientation
|
||||
NEGATE( bbox.m_Size.y ); // Reverse the Y axis, according to the schematic orientation
|
||||
|
||||
bbox.Normalize();
|
||||
|
||||
return bbox;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1805,9 +1878,9 @@ void LIB_PIN::Rotate()
|
|||
int i = GetOrientationCodeIndex( GetOrientation() );
|
||||
|
||||
// Compute the next orientation, swap lower two bits for the right order
|
||||
i = ((i & 2) >> 1) | ((i & 1) << 1);
|
||||
i = ( (i & 2) >> 1 ) | ( (i & 1) << 1 );
|
||||
i = i + 1;
|
||||
i = ((i & 2) >> 1) | ((i & 1) << 1);
|
||||
i = ( (i & 2) >> 1 ) | ( (i & 1) << 1 );
|
||||
|
||||
// Set the new orientation
|
||||
SetOrientation( GetOrientationCode( i ) );
|
||||
|
@ -1876,6 +1949,7 @@ const char*** LIB_PIN::GetStyleSymbols()
|
|||
return s_icons_Pins_Shapes;
|
||||
}
|
||||
|
||||
|
||||
const char** LIB_PIN::GetMenuImage() const
|
||||
{
|
||||
return s_icons_Pins_Electrical_Type[m_type];
|
||||
|
@ -1885,6 +1959,7 @@ const char** LIB_PIN::GetMenuImage() const
|
|||
wxString LIB_PIN::GetSelectMenuText() const
|
||||
{
|
||||
wxString tmp;
|
||||
|
||||
tmp.Printf( _( "Pin %s, %s, %s" ),
|
||||
GetChars( GetNumberString() ),
|
||||
GetChars( GetTypeString() ),
|
||||
|
@ -1906,4 +1981,5 @@ void LIB_PIN::Show( int nestLevel, std::ostream& os )
|
|||
// NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -355,7 +355,7 @@ public:
|
|||
/**
|
||||
* @return the size of the "pen" that be used to draw or plot this item.
|
||||
*/
|
||||
virtual int GetPenSize();
|
||||
virtual int GetPenSize() const;
|
||||
|
||||
void DrawPinSymbol( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
|
||||
int aOrientation, int aDrawMode, int aColor = -1 );
|
||||
|
|
|
@ -233,7 +233,7 @@ void LIB_POLYLINE::AddPoint( const wxPoint& point )
|
|||
* Function GetPenSize
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int LIB_POLYLINE::GetPenSize()
|
||||
int LIB_POLYLINE::GetPenSize() const
|
||||
{
|
||||
return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
|
||||
}
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
/**
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
virtual int GetPenSize( );
|
||||
virtual int GetPenSize( ) const;
|
||||
|
||||
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
|
||||
|
||||
|
|
|
@ -166,7 +166,7 @@ void LIB_RECTANGLE::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFil
|
|||
* Function GetPenSize
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int LIB_RECTANGLE::GetPenSize()
|
||||
int LIB_RECTANGLE::GetPenSize() const
|
||||
{
|
||||
return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
/**
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
virtual int GetPenSize( );
|
||||
virtual int GetPenSize( ) const;
|
||||
|
||||
virtual EDA_RECT GetBoundingBox() const;
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ void LIB_TEXT::DoPlot( PLOTTER* plotter, const wxPoint& offset, bool fill,
|
|||
* Function GetPenSize
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
int LIB_TEXT::GetPenSize( )
|
||||
int LIB_TEXT::GetPenSize( ) const
|
||||
{
|
||||
int pensize = m_Thickness;
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
/**
|
||||
* @return the size of the "pen" that be used to draw or plot this item
|
||||
*/
|
||||
virtual int GetPenSize( );
|
||||
virtual int GetPenSize( ) const;
|
||||
|
||||
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event )
|
|||
int item_flags = m_drawItem->m_Flags; // save flags to restore them after editing
|
||||
LIB_PIN* pin = (LIB_PIN*) m_drawItem;
|
||||
|
||||
DIALOG_LIB_EDIT_PIN dlg( this );
|
||||
DIALOG_LIB_EDIT_PIN dlg( this, pin );
|
||||
|
||||
wxString units = GetUnitsLabel( g_UserUnit );
|
||||
dlg.SetOrientationList( LIB_PIN::GetOrientationNames(), LIB_PIN::GetOrientationSymbols() );
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "fctsys.h"
|
||||
#include "common.h"
|
||||
#include "gr_basic.h"
|
||||
#include "class_drawpanel.h"
|
||||
#include "confirm.h"
|
||||
#include "pcbnew.h"
|
||||
|
@ -133,6 +134,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
|
|||
scale *= 0.7;
|
||||
dc.SetUserScale( scale, scale );
|
||||
|
||||
GRResetPenAndBrush( &dc );
|
||||
m_dummyPad->DrawShape( NULL, &dc, drawInfo );
|
||||
|
||||
event.Skip();
|
||||
|
|
Loading…
Reference in New Issue