Commit 0893f3f3 authored by charras's avatar charras

Pcbnew: make global edit pads function compatible with new pads changes and make it undoable.

parent 3901e152
No preview for this file type
......@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-12-12 09:09+0100\n"
"PO-Revision-Date: 2009-12-12 09:14+0100\n"
"POT-Creation-Date: 2009-12-13 11:15+0100\n"
"PO-Revision-Date: 2009-12-13 11:16+0100\n"
"Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n"
......@@ -4791,7 +4791,7 @@ msgstr "Supprimer Contour de Zone"
#: pcbnew/onrightclick.cpp:622
#: pcbnew/onrightclick.cpp:667
#: pcbnew/onrightclick.cpp:717
#: pcbnew/onrightclick.cpp:774
#: pcbnew/onrightclick.cpp:773
msgid "Move"
msgstr "Déplacer"
......@@ -4812,66 +4812,70 @@ msgstr "Rotation -"
msgid "Flip"
msgstr "Change côté"
#: pcbnew/onrightclick.cpp:726
msgid "Copy current pad settings to this pad"
msgstr "Copier les réglages courants pour ce pad"
#: pcbnew/onrightclick.cpp:725
msgid "Copy Current Settings to this Pad"
msgstr "Copier les Réglages Courants dans ce Pad"
#: pcbnew/onrightclick.cpp:730
msgid "Copy this pad settings to current pad settings"
msgstr "Copier les caractéristiques de ce pad vers les caractéristiques courantes"
#: pcbnew/onrightclick.cpp:729
msgid "Copy this Pad Settings to Current Settings"
msgstr "Copier les Caractéristiques de ce Pad dans les Caractéristiques Courantes"
#: pcbnew/onrightclick.cpp:736
#: pcbnew/onrightclick.cpp:734
msgid "Global Pads Edition"
msgstr "Edition Globale des Pads"
#: pcbnew/onrightclick.cpp:735
msgid "Copy this pad settings to all pads in this footprint (or similar footprints)"
msgstr "Copier les caractéristiques de ce pad vers tous les autres pads de ce module( ou modules similaires)"
#: pcbnew/onrightclick.cpp:745
#: pcbnew/onrightclick.cpp:744
msgid "Autoroute Pad"
msgstr "Autoroute Pad"
#: pcbnew/onrightclick.cpp:746
#: pcbnew/onrightclick.cpp:745
msgid "Autoroute Net"
msgstr "Autoroute Net"
#: pcbnew/onrightclick.cpp:791
#: pcbnew/onrightclick.cpp:790
msgid "Delete Marker"
msgstr "Effacer Marqueur"
#: pcbnew/onrightclick.cpp:792
#: pcbnew/onrightclick.cpp:791
msgid "Marker Error Info"
msgstr "Info du Marqueur d'Erreur"
#: pcbnew/onrightclick.cpp:812
#: pcbnew/onrightclick.cpp:811
msgid "Auto Width"
msgstr "Epaisseur Automatique"
#: pcbnew/onrightclick.cpp:814
#: pcbnew/onrightclick.cpp:813
msgid "Use the track width when starting on a track, otherwise the current track width"
msgstr "Si on démarre sur une piste existante, utiliser sa largeur, sinon utiliser la largeur courante"
#: pcbnew/onrightclick.cpp:824
#: pcbnew/onrightclick.cpp:823
msgid "Use Netclass Values"
msgstr "Utiliser les Valeurs des NetClass"
#: pcbnew/onrightclick.cpp:825
#: pcbnew/onrightclick.cpp:824
msgid "Use track and via sizes from their Netclass values"
msgstr "Utiliser les dimensions de pistes et vias de leur valeurs en Netclasse"
#: pcbnew/onrightclick.cpp:832
#: pcbnew/onrightclick.cpp:831
#, c-format
msgid "Track %s"
msgstr "Piste %s"
#: pcbnew/onrightclick.cpp:834
#: pcbnew/onrightclick.cpp:862
#: pcbnew/onrightclick.cpp:833
#: pcbnew/onrightclick.cpp:861
msgid " (use NetClass)"
msgstr " (NetClass)"
#: pcbnew/onrightclick.cpp:856
#: pcbnew/onrightclick.cpp:855
#, c-format
msgid "Via %s"
msgstr "Via %s"
#: pcbnew/onrightclick.cpp:859
#: pcbnew/onrightclick.cpp:858
#, c-format
msgid "Via %s; (drl %s)"
msgstr "Via %s; (perçage %s)"
......@@ -5569,58 +5573,6 @@ msgstr "Créer Fichier "
msgid " error"
msgstr " erreur"
#: pcbnew/globaleditpad.cpp:75
msgid "Edit Pads Global"
msgstr "Pads: Edition globale"
#: pcbnew/globaleditpad.cpp:90
msgid "Pad Settings..."
msgstr "Caract pad ..."
#: pcbnew/globaleditpad.cpp:94
msgid "Change Module"
msgstr "Change module"
#: pcbnew/globaleditpad.cpp:98
msgid "Change ID Modules"
msgstr "Change Modules ident."
#: pcbnew/globaleditpad.cpp:106
msgid "Pad Filter :"
msgstr "Filtre Pad :"
#: pcbnew/globaleditpad.cpp:110
msgid "Shape Filter"
msgstr "Filtre sur forme"
#: pcbnew/globaleditpad.cpp:115
msgid "Layer Filter"
msgstr "Filtre sur couche"
#: pcbnew/globaleditpad.cpp:120
msgid "Orient Filter"
msgstr "Filtre Orientation"
#: pcbnew/globaleditpad.cpp:127
msgid "Change Items :"
msgstr "Eléments à changer:"
#: pcbnew/globaleditpad.cpp:131
msgid "Change Size"
msgstr "Change Taille"
#: pcbnew/globaleditpad.cpp:136
msgid "Change Shape"
msgstr "Change Forme"
#: pcbnew/globaleditpad.cpp:141
msgid "Change Drill"
msgstr "Change Perçage"
#: pcbnew/globaleditpad.cpp:146
msgid "Change Orientation"
msgstr "Change Orientation"
#: pcbnew/onleftclick.cpp:201
msgid "Graphic not authorized on Copper layers"
msgstr "Graphique non autorisé sur Couches Cuivre"
......@@ -9918,7 +9870,6 @@ msgid "General :"
msgstr "Général :"
#: eeschema/dialog_edit_component_in_lib_base.cpp:27
#: eeschema/dialog_create_component.cpp:172
msgid "As Convert"
msgstr "A une forme \"convertie\""
......@@ -9931,7 +9882,6 @@ msgid "Show or hide pin numbers"
msgstr "Affichage ou non des numéroes de pins"
#: eeschema/dialog_edit_component_in_lib_base.cpp:40
#: eeschema/dialog_create_component.cpp:241
msgid "Show Pin Name"
msgstr "Montre Nom de Pin"
......@@ -9940,7 +9890,6 @@ msgid "Show or hide pin names"
msgstr "Affichage ou non des noms des pins"
#: eeschema/dialog_edit_component_in_lib_base.cpp:47
#: eeschema/dialog_create_component.cpp:245
msgid "Pin Name Inside"
msgstr "Nom de pin à l'intérieur"
......@@ -9957,7 +9906,6 @@ msgid "Number of Units:"
msgstr "Nombre de Parts:"
#: eeschema/dialog_edit_component_in_lib_base.cpp:79
#: eeschema/dialog_create_component.cpp:249
msgid "Skew:"
msgstr "Décalage:"
......@@ -12216,10 +12164,12 @@ msgid "Back View"
msgstr "Vue arrière"
#: 3d-viewer/3d_canvas.cpp:353
#: 3d-viewer/3d_toolbar.cpp:85
msgid "Move left <-"
msgstr "Vers la gauche <-"
#: 3d-viewer/3d_canvas.cpp:358
#: 3d-viewer/3d_toolbar.cpp:88
msgid "Move right ->"
msgstr "Vers la droite ->"
......@@ -12504,6 +12454,7 @@ msgid "Exchange Modules"
msgstr "Echange modules:"
#: pcbnew/dialog_edit_module_for_Modedit_base.h:105
#: pcbnew/dialog_edit_module_for_BoardEditor_base.h:118
msgid "Module properties"
msgstr "Propriétés du Module"
......@@ -12819,6 +12770,40 @@ msgstr "Options d'Affichage"
msgid "Page Settings"
msgstr "Ajustage opt Page"
#, fuzzy
#~ msgid "Set to Current Settings"
#~ msgstr "Ajustages Courants:"
#, fuzzy
#~ msgid "Use this Pad Settings as Current"
#~ msgstr ""
#~ "Copier les caractéristiques de ce pad vers les caractéristiques courantes"
#~ msgid "Edit Pads Global"
#~ msgstr "Pads: Edition globale"
#~ msgid "Pad Settings..."
#~ msgstr "Caract pad ..."
#~ msgid "Change Module"
#~ msgstr "Change module"
#~ msgid "Change ID Modules"
#~ msgstr "Change Modules ident."
#~ msgid "Pad Filter :"
#~ msgstr "Filtre Pad :"
#~ msgid "Shape Filter"
#~ msgstr "Filtre sur forme"
#~ msgid "Layer Filter"
#~ msgstr "Filtre sur couche"
#~ msgid "Orient Filter"
#~ msgstr "Filtre Orientation"
#~ msgid "Change Items :"
#~ msgstr "Eléments à changer:"
#~ msgid "Change Size"
#~ msgstr "Change Taille"
#~ msgid "Change Shape"
#~ msgstr "Change Forme"
#~ msgid "Change Drill"
#~ msgstr "Change Perçage"
#~ msgid "Change Orientation"
#~ msgstr "Change Orientation"
#~ msgid "Single Sided"
#~ msgstr "Simple Face"
#~ msgid "Single Sided, SMD on Back"
......
......@@ -47,6 +47,7 @@ set(PCBNEW_SRCS
dialog_general_options_BoardEditor_base.cpp
dialog_global_edit_tracks_and_vias.cpp
dialog_global_edit_tracks_and_vias_base.cpp
dialog_global_pads_edition_base.cpp
# dialog_graphic_items_options.cpp
dialog_graphic_item_properties.cpp
dialog_graphic_item_properties_base.cpp
......
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_global_pads_edition_base.h"
///////////////////////////////////////////////////////////////////////////
DIALOG_GLOBAL_PADS_EDITION_BASE::DIALOG_GLOBAL_PADS_EDITION_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 );
wxBoxSizer* bMainSizer;
bMainSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizer1;
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, wxT("Pad Filter :") ), wxVERTICAL );
m_Pad_Shape_Filter_CB = new wxCheckBox( this, wxID_ANY, wxT("Do not modify pads having a different shape"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer1->Add( m_Pad_Shape_Filter_CB, 0, wxALL, 5 );
m_Pad_Layer_Filter_CB = new wxCheckBox( this, wxID_ANY, wxT("Do not modify pads having different layers"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer1->Add( m_Pad_Layer_Filter_CB, 0, wxALL, 5 );
m_Pad_Orient_Filter_CB = new wxCheckBox( this, wxID_ANY, wxT("Do not modify pads having a different orientation"), wxDefaultPosition, wxDefaultSize, 0 );
sbSizer1->Add( m_Pad_Orient_Filter_CB, 0, wxALL, 5 );
bLeftSizer->Add( sbSizer1, 1, wxEXPAND, 5 );
bMainSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
wxBoxSizer* bRightSizer;
bRightSizer = new wxBoxSizer( wxVERTICAL );
m_buttonPadEditor = new wxButton( this, ID_CHANGE_GET_PAD_SETTINGS, wxT("Pad Editor"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_buttonPadEditor, 0, wxALL|wxEXPAND, 5 );
bRightSizer->Add( 10, 10, 0, 0, 5 );
m_button2 = new wxButton( this, ID_CHANGE_CURRENT_MODULE, wxT("Change Pads on Module"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_button2, 0, wxALL|wxEXPAND, 5 );
m_button3 = new wxButton( this, ID_CHANGE_ID_MODULES, wxT("Change Pads on Same Modules"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_button3, 0, wxALL|wxEXPAND, 5 );
m_button4 = new wxButton( this, wxID_CANCEL, wxT("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
bRightSizer->Add( m_button4, 0, wxALL|wxEXPAND, 5 );
bMainSizer->Add( bRightSizer, 0, wxEXPAND, 5 );
this->SetSizer( bMainSizer );
this->Layout();
// Connect Events
m_buttonPadEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_PADS_EDITION_BASE::InstallPadEditor ), NULL, this );
m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_PADS_EDITION_BASE::PadPropertiesAccept ), NULL, this );
m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_PADS_EDITION_BASE::PadPropertiesAccept ), NULL, this );
m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_PADS_EDITION_BASE::OnCancelClick ), NULL, this );
}
DIALOG_GLOBAL_PADS_EDITION_BASE::~DIALOG_GLOBAL_PADS_EDITION_BASE()
{
// Disconnect Events
m_buttonPadEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_PADS_EDITION_BASE::InstallPadEditor ), NULL, this );
m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_PADS_EDITION_BASE::PadPropertiesAccept ), NULL, this );
m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_PADS_EDITION_BASE::PadPropertiesAccept ), NULL, this );
m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_PADS_EDITION_BASE::OnCancelClick ), NULL, this );
}
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project>
<FileVersion major="1" minor="9" />
<object class="Project" expanded="1">
<property name="class_decoration"></property>
<property name="code_generation">C++</property>
<property name="disconnect_events">1</property>
<property name="encoding">UTF-8</property>
<property name="event_generation">connect</property>
<property name="file">dialog_global_pads_edition_base</property>
<property name="first_id">1000</property>
<property name="help_provider">none</property>
<property name="internationalize">0</property>
<property name="name">dialog_global_pads_edition</property>
<property name="namespace"></property>
<property name="path">.</property>
<property name="precompiled_header"></property>
<property name="relative_path">1</property>
<property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1">
<property name="bg"></property>
<property name="center"></property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="extra_style"></property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">DIALOG_GLOBAL_PADS_EDITION_BASE</property>
<property name="pos"></property>
<property name="size">482,165</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property>
<property name="title">Global Pads Edition</property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnActivate"></event>
<event name="OnActivateApp"></event>
<event name="OnChar"></event>
<event name="OnClose"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnHibernate"></event>
<event name="OnIconize"></event>
<event name="OnIdle"></event>
<event name="OnInitDialog"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bMainSizer</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bLeftSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">1</property>
<object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property>
<property name="label">Pad Filter :</property>
<property name="minimum_size"></property>
<property name="name">sbSizer1</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<event name="OnUpdateUI"></event>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Do not modify pads having a different shape</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_Pad_Shape_Filter_CB</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Do not modify pads having different layers</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_Pad_Layer_Filter_CB</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="bg"></property>
<property name="checked">0</property>
<property name="context_help"></property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Do not modify pads having a different orientation</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_Pad_Orient_Filter_CB</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnChar"></event>
<event name="OnCheckBox"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bRightSizer</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_CHANGE_GET_PAD_SETTINGS</property>
<property name="label">Pad Editor</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_buttonPadEditor</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">InstallPadEditor</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag"></property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">10</property>
<property name="permission">protected</property>
<property name="width">10</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_CHANGE_CURRENT_MODULE</property>
<property name="label">Change Pads on Module</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_button2</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">PadPropertiesAccept</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">ID_CHANGE_ID_MODULES</property>
<property name="label">Change Pads on Same Modules</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_button3</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">PadPropertiesAccept</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="bg"></property>
<property name="context_help"></property>
<property name="default">0</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="font"></property>
<property name="hidden">0</property>
<property name="id">wxID_CANCEL</property>
<property name="label">Cancel</property>
<property name="maximum_size"></property>
<property name="minimum_size"></property>
<property name="name">m_button4</property>
<property name="permission">protected</property>
<property name="pos"></property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass"></property>
<property name="tooltip"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnCancelClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>
</wxFormBuilder_Project>
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Apr 16 2008)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __dialog_global_pads_edition_base__
#define __dialog_global_pads_edition_base__
#include <wx/string.h>
#include <wx/checkbox.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/button.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
#define ID_CHANGE_GET_PAD_SETTINGS 1000
#define ID_CHANGE_CURRENT_MODULE 1001
#define ID_CHANGE_ID_MODULES 1002
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_GLOBAL_PADS_EDITION_BASE
///////////////////////////////////////////////////////////////////////////////
class DIALOG_GLOBAL_PADS_EDITION_BASE : public wxDialog
{
private:
protected:
wxCheckBox* m_Pad_Shape_Filter_CB;
wxCheckBox* m_Pad_Layer_Filter_CB;
wxCheckBox* m_Pad_Orient_Filter_CB;
wxButton* m_buttonPadEditor;
wxButton* m_button2;
wxButton* m_button3;
wxButton* m_button4;
// Virtual event handlers, overide them in your derived class
virtual void InstallPadEditor( wxCommandEvent& event ){ event.Skip(); }
virtual void PadPropertiesAccept( wxCommandEvent& event ){ event.Skip(); }
virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); }
public:
DIALOG_GLOBAL_PADS_EDITION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Global Pads Edition"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 482,165 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
~DIALOG_GLOBAL_PADS_EDITION_BASE();
};
#endif //__dialog_global_pads_edition_base__
......@@ -33,10 +33,10 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
int itmp;
wxClientDC dc( DrawPanel );
DrawPanel->PrepareGraphicContext( &dc );
BOARD_ITEM* DrawStruct = GetCurItem();
DrawPanel->CursorOff( &dc );
DrawPanel->PrepareGraphicContext( &dc );
wxGetMousePosition( &pos.x, &pos.y );
......
......@@ -3,184 +3,107 @@
/*************/
#include "fctsys.h"
#include "gr_basic.h"
//#include "gr_basic.h"
#include "common.h"
#include "class_drawpanel.h"
#include "confirm.h"
#include "pcbnew.h"
#include "trigo.h"
#include "drag.h"
#include "protos.h"
//#include "trigo.h"
/* Variables Locales */
static bool Pad_Shape_Filter = TRUE;
static bool Pad_Layer_Filter = TRUE;
static bool Pad_Orient_Filter = TRUE;
static bool Pad_Size_Change = TRUE;
static bool Pad_Shape_Change = FALSE;
static bool Pad_Orient_Change = FALSE;
static bool Pad_Drill_Change = TRUE;
//#include "drag.h"
enum id_pad_global_edit {
ID_CHANGE_CURRENT_MODULE = 1900,
ID_CHANGE_ID_MODULES,
ID_CHANGE_GET_PAD_SETTINGS
};
//#include "protos.h"
#include "dialog_global_pads_edition_base.h"
/************************************/
/* class WinEDA_PadGlobalEditFrame */
/* class DIALOG_GLOBAL_PADS_EDITION */
/************************************/
class WinEDA_PadGlobalEditFrame : public wxDialog
class DIALOG_GLOBAL_PADS_EDITION : public DIALOG_GLOBAL_PADS_EDITION_BASE
{
private:
WinEDA_BasePcbFrame* m_Parent;
D_PAD* CurrentPad;
wxCheckBox* m_Pad_Shape_Filter;
wxCheckBox* m_Pad_Layer_Filter;
wxCheckBox* m_Pad_Orient_Filter;
wxCheckBox* m_Pad_Size_Change;
wxCheckBox* m_Pad_Shape_Change;
wxCheckBox* m_Pad_Drill_Change;
wxCheckBox* m_Pad_Orient_Change;
D_PAD* m_CurrentPad;
public:
static bool m_Pad_Shape_Filter;
static bool m_Pad_Layer_Filter;
static bool m_Pad_Orient_Filter;
public:
WinEDA_PadGlobalEditFrame( WinEDA_BasePcbFrame* parent, D_PAD* Pad );
~WinEDA_PadGlobalEditFrame() { }
DIALOG_GLOBAL_PADS_EDITION( WinEDA_BasePcbFrame* parent, D_PAD* Pad );
~DIALOG_GLOBAL_PADS_EDITION() { }
private:
void InstallPadEditor( wxCommandEvent& event );
void PadPropertiesAccept( wxCommandEvent& event );
void OnCancelClick( wxCommandEvent& event );
DECLARE_EVENT_TABLE()
};
BEGIN_EVENT_TABLE( WinEDA_PadGlobalEditFrame, wxDialog )
EVT_BUTTON( ID_CHANGE_CURRENT_MODULE,
WinEDA_PadGlobalEditFrame::PadPropertiesAccept )
EVT_BUTTON( ID_CHANGE_ID_MODULES,
WinEDA_PadGlobalEditFrame::PadPropertiesAccept )
EVT_BUTTON( ID_CHANGE_GET_PAD_SETTINGS,
WinEDA_PadGlobalEditFrame::PadPropertiesAccept )
EVT_BUTTON( wxID_CANCEL, WinEDA_PadGlobalEditFrame::OnCancelClick )
END_EVENT_TABLE()
WinEDA_PadGlobalEditFrame::WinEDA_PadGlobalEditFrame(
DIALOG_GLOBAL_PADS_EDITION::DIALOG_GLOBAL_PADS_EDITION(
WinEDA_BasePcbFrame* parent,
D_PAD* Pad ) :
wxDialog( parent, -1, _( "Edit Pads Global" ), wxDefaultPosition,
wxSize( 310, 235 ), DIALOG_STYLE )
DIALOG_GLOBAL_PADS_EDITION_BASE( parent )
{
wxPoint pos;
wxButton* Button;
m_Parent = parent;
Centre();
CurrentPad = Pad;
/* Create command buttons. */
pos.x = 150;
pos.y = 10;
Button = new wxButton( this, ID_CHANGE_GET_PAD_SETTINGS,
_( "Pad Settings..." ), pos );
pos.y += Button->GetDefaultSize().y + 50;
Button = new wxButton( this, ID_CHANGE_CURRENT_MODULE,
_( "Change Module" ), pos );
pos.y += Button->GetDefaultSize().y + 10;
Button = new wxButton( this, ID_CHANGE_ID_MODULES,
_( "Change ID Modules" ), pos );
pos.y += Button->GetDefaultSize().y + 10;
Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ), pos );
m_CurrentPad = Pad;
// Pad filter selection.
pos.x = 5;
pos.y = 5;
new wxStaticBox( this, -1, _( "Pad Filter :" ), pos, wxSize( 130, 75 ) );
pos.x += 5;
pos.y += 18;
m_Pad_Shape_Filter = new wxCheckBox( this, -1, _( "Shape Filter" ), pos );
m_Pad_Shape_Filter->SetValue( Pad_Shape_Filter );
pos.y += 18;
m_Pad_Layer_Filter = new wxCheckBox( this, -1, _( "Layer Filter" ), pos );
m_Pad_Layer_Filter->SetValue( Pad_Layer_Filter );
m_Pad_Shape_Filter_CB->SetValue( m_Pad_Shape_Filter );
m_Pad_Layer_Filter_CB->SetValue( m_Pad_Layer_Filter );
m_Pad_Orient_Filter_CB->SetValue( m_Pad_Orient_Filter );
pos.y += 18;
m_Pad_Orient_Filter = new wxCheckBox( this, -1, _( "Orient Filter" ), pos );
m_Pad_Orient_Filter->SetValue( Pad_Orient_Filter );
// Items a editer
pos.x -= 5;
pos.y += 25;
new wxStaticBox( this, -1, _( "Change Items :" ), pos, wxSize( 130, 95 ) );
pos.x += 5;
pos.y += 18;
m_Pad_Size_Change = new wxCheckBox( this, -1, _( "Change Size" ), pos );
m_Pad_Size_Change->SetValue( Pad_Size_Change );
pos.y += 18;
m_Pad_Shape_Change = new wxCheckBox( this, -1, _( "Change Shape" ), pos );
m_Pad_Shape_Change->SetValue( Pad_Shape_Change );
GetSizer()->Fit( this );
Centre();
}
pos.y += 18;
m_Pad_Drill_Change = new wxCheckBox( this, -1, _( "Change Drill" ), pos );
m_Pad_Drill_Change->SetValue( Pad_Drill_Change );
/*Class DIALOG_GLOBAL_PADS_EDITION static variables */
bool DIALOG_GLOBAL_PADS_EDITION::m_Pad_Shape_Filter = true;
bool DIALOG_GLOBAL_PADS_EDITION::m_Pad_Layer_Filter = true;
bool DIALOG_GLOBAL_PADS_EDITION::m_Pad_Orient_Filter = true;
pos.y += 18;
m_Pad_Orient_Change = new wxCheckBox( this, -1, _( "Change Orientation" ),
pos );
m_Pad_Orient_Change->SetValue( Pad_Orient_Change );
void DIALOG_GLOBAL_PADS_EDITION::OnCancelClick( wxCommandEvent& event )
{
EndModal( -1 );
}
void WinEDA_PadGlobalEditFrame::OnCancelClick( wxCommandEvent& WXUNUSED( event ) )
/* Calls the Pad editor.
*/
void DIALOG_GLOBAL_PADS_EDITION::InstallPadEditor( wxCommandEvent& event )
{
EndModal( -1 );
wxClientDC dc( m_Parent->DrawPanel );
m_Parent->DrawPanel->PrepareGraphicContext( &dc );
m_Parent->DrawPanel->CursorOff( &dc );
m_Parent->InstallPadOptionsFrame( m_CurrentPad, &dc, wxDefaultPosition );
m_Parent->DrawPanel->CursorOn( &dc );
}
/* Update the parameters for the component being edited.
*/
void WinEDA_PadGlobalEditFrame::PadPropertiesAccept( wxCommandEvent& event )
void DIALOG_GLOBAL_PADS_EDITION::PadPropertiesAccept( wxCommandEvent& event )
{
int returncode = 0;
switch( event.GetId() )
{
case ID_CHANGE_GET_PAD_SETTINGS:
m_Parent->InstallPadOptionsFrame( NULL, NULL, wxPoint( -1, -1 ) );
break;
case ID_CHANGE_ID_MODULES:
returncode = 1;
// Fall through
case ID_CHANGE_CURRENT_MODULE:
Pad_Shape_Filter = m_Pad_Shape_Filter->GetValue();
Pad_Layer_Filter = m_Pad_Layer_Filter->GetValue();
Pad_Orient_Filter = m_Pad_Orient_Filter->GetValue();
Pad_Size_Change = m_Pad_Size_Change->GetValue();
Pad_Shape_Change = m_Pad_Shape_Change->GetValue();
Pad_Drill_Change = m_Pad_Drill_Change->GetValue();
Pad_Orient_Change = m_Pad_Orient_Change->GetValue();
m_Pad_Shape_Filter = m_Pad_Shape_Filter_CB->GetValue();
m_Pad_Layer_Filter = m_Pad_Layer_Filter_CB->GetValue();
m_Pad_Orient_Filter = m_Pad_Orient_Filter_CB->GetValue();
EndModal( returncode );
break;
}
......@@ -198,10 +121,10 @@ void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw )
{
MODULE* Module_Ref, * Module;
int diag;
bool Edit_Same_Modules = FALSE;
bool edit_Same_Modules = false;
if( aPad == NULL )
return;
aPad = &g_Pad_Master;
Module = (MODULE*) aPad->GetParent();
......@@ -212,39 +135,74 @@ void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw )
return;
}
wxString ref_name_module = Module->m_LibRef;
Module->DisplayInfo( this );
WinEDA_PadGlobalEditFrame* frame = new WinEDA_PadGlobalEditFrame( this,
aPad );
DIALOG_GLOBAL_PADS_EDITION* dlg = new DIALOG_GLOBAL_PADS_EDITION( this, aPad );
diag = frame->ShowModal();
frame->Destroy();
diag = dlg->ShowModal();
dlg->Destroy();
if( diag == -1 )
return;
if( diag == 1 )
Edit_Same_Modules = TRUE;
edit_Same_Modules = true;
/* Search and copy the name of library reference. */
Module_Ref = Module;
int pad_orient = aPad->m_Orient - Module_Ref->m_Orient;
/* Update the modules or module. */
// Prepare une undo list:
PICKED_ITEMS_LIST itemsList;
Module = (MODULE*) m_Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() )
{
if( !Edit_Same_Modules )
if( Module != Module_Ref )
if( !edit_Same_Modules && (Module != Module_Ref) )
continue;
if( ref_name_module != Module->m_LibRef )
if( Module->m_LibRef != Module->m_LibRef )
continue;
Module->DisplayInfo( this );
bool saveMe = false;
D_PAD* pt_pad = (D_PAD*) Module->m_Pads;
for( ; pt_pad != NULL; pt_pad = pt_pad->Next() )
{
/* Filters changes prohibited. */
if( DIALOG_GLOBAL_PADS_EDITION::m_Pad_Shape_Filter
&& ( pt_pad->m_PadShape != aPad->m_PadShape ) )
continue;
/* Erase module */
if( DIALOG_GLOBAL_PADS_EDITION::m_Pad_Orient_Filter
&& ( (pt_pad->m_Orient - Module->m_Orient) != pad_orient ) )
continue;
if( DIALOG_GLOBAL_PADS_EDITION::m_Pad_Layer_Filter
&& ( pt_pad->m_Masque_Layer != aPad->m_Masque_Layer ) )
continue;
saveMe = true;
}
if( saveMe )
{
ITEM_PICKER itemWrapper( Module, UR_CHANGED );
itemWrapper.m_PickedItemType = Module->Type();
itemsList.PushItem( itemWrapper );
}
}
SaveCopyInUndoList( itemsList, UR_CHANGED );
/* Update the current module and same others modules if requested. */
Module = (MODULE*) m_Pcb->m_Modules;
for( ; Module != NULL; Module = Module->Next() )
{
if( !edit_Same_Modules && (Module != Module_Ref) )
continue;
if( Module->m_LibRef != Module->m_LibRef )
continue;
/* Erase module on screen */
if( aDraw )
{
Module->m_Flags |= DO_NOT_DRAW;
......@@ -256,22 +214,17 @@ void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw )
for( ; pt_pad != NULL; pt_pad = pt_pad->Next() )
{
/* Filters changes prohibited. */
if( Pad_Shape_Filter )
{
if( pt_pad->m_PadShape != g_Pad_Master.m_PadShape )
if( DIALOG_GLOBAL_PADS_EDITION::m_Pad_Shape_Filter
&& ( pt_pad->m_PadShape != aPad->m_PadShape ) )
continue;
}
if( Pad_Orient_Filter )
{
if( (pt_pad->m_Orient - Module->m_Orient) !=
g_Pad_Master.m_Orient )
if( DIALOG_GLOBAL_PADS_EDITION::m_Pad_Orient_Filter
&& ( (pt_pad->m_Orient - Module->m_Orient) != pad_orient ) )
continue;
}
if( Pad_Layer_Filter )
if( DIALOG_GLOBAL_PADS_EDITION::m_Pad_Layer_Filter )
{
if( pt_pad->m_Masque_Layer != g_Pad_Master.m_Masque_Layer )
if( pt_pad->m_Masque_Layer != aPad->m_Masque_Layer )
continue;
else
m_Pcb->m_Status_Pcb &=
......@@ -279,41 +232,37 @@ void WinEDA_BasePcbFrame::Global_Import_Pad_Settings( D_PAD* aPad, bool aDraw )
}
/* Change characteristics.: */
if( Pad_Shape_Change )
{
pt_pad->m_Attribut = g_Pad_Master.m_Attribut;
pt_pad->m_PadShape = g_Pad_Master.m_PadShape;
}
pt_pad->m_Attribut = aPad->m_Attribut;
pt_pad->m_PadShape = aPad->m_PadShape;
pt_pad->m_Masque_Layer = g_Pad_Master.m_Masque_Layer;
pt_pad->m_Masque_Layer = aPad->m_Masque_Layer;
if( Pad_Size_Change )
{
pt_pad->m_Size = g_Pad_Master.m_Size;
pt_pad->m_DeltaSize = g_Pad_Master.m_DeltaSize;
pt_pad->m_Offset = g_Pad_Master.m_Offset;
}
pt_pad->m_Size = aPad->m_Size;
pt_pad->m_DeltaSize = aPad->m_DeltaSize;
pt_pad->m_Offset = aPad->m_Offset;
if( Pad_Drill_Change )
{
pt_pad->m_Drill = g_Pad_Master.m_Drill;
pt_pad->m_DrillShape = g_Pad_Master.m_DrillShape;
}
pt_pad->m_Drill = aPad->m_Drill;
pt_pad->m_DrillShape = aPad->m_DrillShape;
pt_pad->m_Orient = pad_orient + Module->m_Orient;
// copy also local mask margins,
// because these parameters usually depend on
// pads sizes and layers
pt_pad->m_LocalSolderMaskMargin = aPad->m_LocalSolderMaskMargin;
pt_pad->m_LocalSolderPasteMargin = aPad->m_LocalSolderPasteMargin;
pt_pad->m_LocalSolderPasteMarginRatio = aPad->m_LocalSolderPasteMarginRatio;
if( Pad_Orient_Change )
{
pt_pad->m_Orient = g_Pad_Master.m_Orient + Module->m_Orient;
}
if( g_Pad_Master.m_PadShape != PAD_TRAPEZOID )
if( pt_pad->m_PadShape != PAD_TRAPEZOID )
{
pt_pad->m_DeltaSize.x = 0;
pt_pad->m_DeltaSize.y = 0;
}
if( g_Pad_Master.m_PadShape == PAD_CIRCLE )
if( pt_pad->m_PadShape == PAD_CIRCLE )
pt_pad->m_Size.y = pt_pad->m_Size.x;
switch( g_Pad_Master.m_Attribut & 0x7F )
switch( pt_pad->m_Attribut & 0x7F )
{
case PAD_SMD:
case PAD_CONN:
......
......@@ -722,18 +722,17 @@ void WinEDA_PcbFrame::createPopUpMenuForFpPads( D_PAD* Pad, wxMenu* menu )
sub_menu_Pad->AppendSeparator();
ADD_MENUITEM_WITH_HELP( sub_menu_Pad, ID_POPUP_PCB_IMPORT_PAD_SETTINGS,
_( "New Pad Settings" ),
_( "Copy current pad settings to this pad" ),
_( "Copy Current Settings to this Pad" ),
wxEmptyString,
options_new_pad_xpm );
ADD_MENUITEM_WITH_HELP( sub_menu_Pad, ID_POPUP_PCB_EXPORT_PAD_SETTINGS,
_( "Export Pad Settings" ),
_( "Copy this pad settings to current pad settings" ),
_( "Copy this Pad Settings to Current Settings" ),
wxEmptyString,
export_options_pad_xpm );
ADD_MENUITEM_WITH_HELP( sub_menu_Pad, ID_POPUP_PCB_GLOBAL_IMPORT_PAD_SETTINGS,
_( "Global Pad Settings" ),
_(
"Copy this pad settings to all pads in this footprint (or similar footprints)" ),
_( "Global Pads Edition" ),
_( "Copy this pad settings to all pads in this footprint (or similar footprints)" ),
global_options_pad_xpm );
sub_menu_Pad->AppendSeparator();
......
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