Commit 135a6274 authored by jean-pierre charras's avatar jean-pierre charras

Eeschema: enhanced Pin editor dialog.

parent 8e538ddd
#include "fctsys.h" #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" #include "dialog_lib_edit_pin.h"
...@@ -7,17 +12,24 @@ ...@@ -7,17 +12,24 @@
wxPoint DIALOG_LIB_EDIT_PIN::s_LastPos( -1, -1 ); wxPoint DIALOG_LIB_EDIT_PIN::s_LastPos( -1, -1 );
wxSize DIALOG_LIB_EDIT_PIN::s_LastSize; 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 ) 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. */ /* Required to make escape key work correctly in wxGTK. */
SetFocus(); SetFocus();
// Set tab order // Set tab order
m_textPinName-> MoveAfterInTabOrder(this);
m_textPadName-> MoveAfterInTabOrder(m_textPinName); m_textPadName-> MoveAfterInTabOrder(m_textPinName);
m_sdbSizerButtonsOK->SetDefault(); m_sdbSizerButtonsOK->SetDefault();
} }
DIALOG_LIB_EDIT_PIN::~DIALOG_LIB_EDIT_PIN()
{
delete m_dummyPin;
}
void DIALOG_LIB_EDIT_PIN::SetLastSizeAndPosition() void DIALOG_LIB_EDIT_PIN::SetLastSizeAndPosition()
{ {
if( s_LastPos.x != -1 ) if( s_LastPos.x != -1 )
...@@ -32,6 +44,37 @@ void DIALOG_LIB_EDIT_PIN::SetLastSizeAndPosition() ...@@ -32,6 +44,37 @@ void DIALOG_LIB_EDIT_PIN::SetLastSizeAndPosition()
Center(); 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 ) void DIALOG_LIB_EDIT_PIN::OnCloseDialog( wxCloseEvent& event )
{ {
// Save the dialog's position // Save the dialog's position
...@@ -56,6 +99,26 @@ void DIALOG_LIB_EDIT_PIN::OnOKButtonClick( wxCommandEvent& event ) ...@@ -56,6 +99,26 @@ void DIALOG_LIB_EDIT_PIN::OnOKButtonClick( wxCommandEvent& event )
EndModal( wxID_OK ); 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, void DIALOG_LIB_EDIT_PIN::SetOrientationList( const wxArrayString& list,
......
...@@ -16,14 +16,19 @@ class DIALOG_LIB_EDIT_PIN : public DIALOG_LIB_EDIT_PIN_BASE ...@@ -16,14 +16,19 @@ class DIALOG_LIB_EDIT_PIN : public DIALOG_LIB_EDIT_PIN_BASE
static wxSize s_LastSize; ///< last position and size static wxSize s_LastSize; ///< last position and size
static wxPoint s_LastPos; static wxPoint s_LastPos;
LIB_PIN * m_dummyPin; // a working copy used to show changes
public: public:
/** Constructor */ /** Constructor */
DIALOG_LIB_EDIT_PIN( wxWindow* parent ); DIALOG_LIB_EDIT_PIN( wxWindow* parent, LIB_PIN* aPin );
~DIALOG_LIB_EDIT_PIN();
void SetLastSizeAndPosition(); void SetLastSizeAndPosition();
void OnCloseDialog( wxCloseEvent& event ); void OnCloseDialog( wxCloseEvent& event );
void OnCancelButtonClick( wxCommandEvent& event ); void OnCancelButtonClick( wxCommandEvent& event );
void OnOKButtonClick( wxCommandEvent& event ); void OnOKButtonClick( wxCommandEvent& event );
void OnPaintShowPanel( wxPaintEvent& event );
void OnPropertiesChange( wxCommandEvent& event );
void SetOrientationList( const wxArrayString& list, const char *** aBitmaps ); void SetOrientationList( const wxArrayString& list, const char *** aBitmaps );
void SetOrientation( int orientation ) void SetOrientation( int orientation )
......
...@@ -22,6 +22,8 @@ class wxBitmapComboBox; ...@@ -22,6 +22,8 @@ class wxBitmapComboBox;
#include <wx/combobox.h> #include <wx/combobox.h>
#include <wx/sizer.h> #include <wx/sizer.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/statbox.h>
#include <wx/panel.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/dialog.h> #include <wx/dialog.h>
...@@ -33,60 +35,48 @@ class wxBitmapComboBox; ...@@ -33,60 +35,48 @@ class wxBitmapComboBox;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog
{ {
DECLARE_EVENT_TABLE()
private: 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: protected:
enum enum
{ {
ID_M_TEXTPINNAME = 1000, ID_M_TEXTPINNAME = 1000,
ID_M_TEXTPINNAMETEXTSIZE,
ID_M_STATICTEXTPADNAME, ID_M_STATICTEXTPADNAME,
ID_M_TEXTPADNAME, ID_M_TEXTPADNAME,
ID_M_STATICTEXTNAMESIZE,
ID_M_TEXTPINNAMETEXTSIZE,
ID_M_STATICNAMETEXTSIZEUNITS,
ID_M_STATICTEXTPADNAMESIZE,
ID_M_TEXTPADNAMETEXTSIZE, ID_M_TEXTPADNAMETEXTSIZE,
ID_M_STATICNUMBERTEXTSIZEUNITS,
ID_M_STATICTEXTPINLEN, ID_M_STATICTEXTPINLEN,
ID_M_TEXTLENGTH,
ID_M_STATICLENGTHUNITS,
}; };
wxStaticText* m_staticTextPinName; wxStaticText* m_staticTextPinName;
wxTextCtrl* m_textPinName; wxTextCtrl* m_textPinName;
wxStaticText* m_staticTextNameSize;
wxTextCtrl* m_textPinNameTextSize;
wxStaticText* m_staticNameTextSizeUnits;
wxStaticText* m_staticTextPadName; wxStaticText* m_staticTextPadName;
wxTextCtrl* m_textPadName; wxTextCtrl* m_textPadName;
wxStaticText* m_staticTextPadNameSize;
wxTextCtrl* m_textPadNameTextSize;
wxStaticText* m_staticNumberTextSizeUnits;
wxStaticText* m_staticTextOrient; wxStaticText* m_staticTextOrient;
wxBitmapComboBox* m_choiceOrientation; wxBitmapComboBox* m_choiceOrientation;
wxStaticText* m_staticTextPinLen;
wxTextCtrl* m_textLength;
wxStaticText* m_staticLengthUnits;
wxStaticText* m_staticTextEType; wxStaticText* m_staticTextEType;
wxBitmapComboBox* m_choiceElectricalType; wxBitmapComboBox* m_choiceElectricalType;
wxStaticText* m_staticTextGstyle; wxStaticText* m_staticTextGstyle;
wxBitmapComboBox* m_choiceStyle; wxBitmapComboBox* m_choiceStyle;
wxCheckBox* m_checkApplyToAllParts; wxCheckBox* m_checkApplyToAllParts;
wxCheckBox* m_checkApplyToAllConversions; wxCheckBox* m_checkApplyToAllConversions;
wxCheckBox* m_checkShow; 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; wxStaticLine* m_staticline1;
wxStdDialogButtonSizer* m_sdbSizerButtons; wxStdDialogButtonSizer* m_sdbSizerButtons;
wxButton* m_sdbSizerButtonsOK; wxButton* m_sdbSizerButtonsOK;
...@@ -94,14 +84,16 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog ...@@ -94,14 +84,16 @@ class DIALOG_LIB_EDIT_PIN_BASE : public wxDialog
// Virtual event handlers, overide them in your derived class // Virtual event handlers, overide them in your derived class
virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); } virtual void OnCloseDialog( wxCloseEvent& event ) { event.Skip(); }
virtual void OnPropertiesChange( wxCommandEvent& event ) { event.Skip(); }
virtual void OnCBpartSelection( 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 OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); }
public: 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(); ~DIALOG_LIB_EDIT_PIN_BASE();
}; };
......
...@@ -319,7 +319,7 @@ void LIB_ARC::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, ...@@ -319,7 +319,7 @@ void LIB_ARC::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
* Function GetPenSize * Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @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; return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
} }
......
...@@ -102,7 +102,7 @@ public: ...@@ -102,7 +102,7 @@ public:
/** /**
* @return the size of the "pen" that be used to draw or plot this item * @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(). * See LIB_DRAW_ITEM::BeginEdit().
......
...@@ -236,7 +236,7 @@ void LIB_BEZIER::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, ...@@ -236,7 +236,7 @@ void LIB_BEZIER::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
* Function GetPenSize * Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @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; return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
} }
......
...@@ -72,7 +72,7 @@ public: ...@@ -72,7 +72,7 @@ public:
/** /**
* @return the size of the "pen" that be used to draw or plot this item * @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 ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
......
...@@ -191,7 +191,7 @@ void LIB_CIRCLE::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, ...@@ -191,7 +191,7 @@ void LIB_CIRCLE::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
* Function GetPenSize * Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @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; return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
} }
......
...@@ -67,7 +67,7 @@ public: ...@@ -67,7 +67,7 @@ public:
/** /**
* @return the size of the "pen" that be used to draw or plot this item * @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 EDA_RECT GetBoundingBox() const;
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
......
...@@ -185,7 +185,7 @@ public: ...@@ -185,7 +185,7 @@ public:
/** /**
* @return the size of the "pen" that be used to draw or plot this item * @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. * Write draw item object to \a aFile in "*.lib" format.
......
...@@ -272,7 +272,7 @@ bool LIB_FIELD::Load( char* line, wxString& errorMsg ) ...@@ -272,7 +272,7 @@ bool LIB_FIELD::Load( char* line, wxString& errorMsg )
* Function GetPenSize * Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @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; return ( m_Thickness == 0 ) ? g_DrawDefaultLineThickness : m_Thickness;
} }
......
...@@ -86,10 +86,10 @@ public: ...@@ -86,10 +86,10 @@ public:
void SetId( int aId ) { m_id = aId; } 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 * @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. * Writes field object out to a FILE in "*.lib" format.
......
This diff is collapsed.
...@@ -355,7 +355,7 @@ public: ...@@ -355,7 +355,7 @@ public:
/** /**
* @return the size of the "pen" that be used to draw or plot this item. * @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, void DrawPinSymbol( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
int aOrientation, int aDrawMode, int aColor = -1 ); int aOrientation, int aDrawMode, int aColor = -1 );
......
...@@ -233,7 +233,7 @@ void LIB_POLYLINE::AddPoint( const wxPoint& point ) ...@@ -233,7 +233,7 @@ void LIB_POLYLINE::AddPoint( const wxPoint& point )
* Function GetPenSize * Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @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; return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
} }
......
...@@ -86,7 +86,7 @@ public: ...@@ -86,7 +86,7 @@ public:
/** /**
* @return the size of the "pen" that be used to draw or plot this item * @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 ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
......
...@@ -166,7 +166,7 @@ void LIB_RECTANGLE::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFil ...@@ -166,7 +166,7 @@ void LIB_RECTANGLE::DoPlot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFil
* Function GetPenSize * Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @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; return ( m_Width == 0 ) ? g_DrawDefaultLineThickness : m_Width;
} }
......
...@@ -72,7 +72,7 @@ public: ...@@ -72,7 +72,7 @@ public:
/** /**
* @return the size of the "pen" that be used to draw or plot this item * @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 EDA_RECT GetBoundingBox() const;
......
...@@ -286,7 +286,7 @@ void LIB_TEXT::DoPlot( PLOTTER* plotter, const wxPoint& offset, bool fill, ...@@ -286,7 +286,7 @@ void LIB_TEXT::DoPlot( PLOTTER* plotter, const wxPoint& offset, bool fill,
* Function GetPenSize * Function GetPenSize
* @return the size of the "pen" that be used to draw or plot this item * @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; int pensize = m_Thickness;
......
...@@ -94,7 +94,7 @@ public: ...@@ -94,7 +94,7 @@ public:
/** /**
* @return the size of the "pen" that be used to draw or plot this item * @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 ); virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
......
...@@ -46,7 +46,7 @@ void LIB_EDIT_FRAME::OnEditPin( wxCommandEvent& event ) ...@@ -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 int item_flags = m_drawItem->m_Flags; // save flags to restore them after editing
LIB_PIN* pin = (LIB_PIN*) m_drawItem; 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 ); wxString units = GetUnitsLabel( g_UserUnit );
dlg.SetOrientationList( LIB_PIN::GetOrientationNames(), LIB_PIN::GetOrientationSymbols() ); dlg.SetOrientationList( LIB_PIN::GetOrientationNames(), LIB_PIN::GetOrientationSymbols() );
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#include "fctsys.h" #include "fctsys.h"
#include "common.h" #include "common.h"
#include "gr_basic.h"
#include "class_drawpanel.h" #include "class_drawpanel.h"
#include "confirm.h" #include "confirm.h"
#include "pcbnew.h" #include "pcbnew.h"
...@@ -133,6 +134,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event ) ...@@ -133,6 +134,7 @@ void DIALOG_PAD_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
scale *= 0.7; scale *= 0.7;
dc.SetUserScale( scale, scale ); dc.SetUserScale( scale, scale );
GRResetPenAndBrush( &dc );
m_dummyPad->DrawShape( NULL, &dc, drawInfo ); m_dummyPad->DrawShape( NULL, &dc, drawInfo );
event.Skip(); event.Skip();
......
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