diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index e0c1596723..992669dc51 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -320,10 +320,14 @@ public: * Function ResetModuleTextSizes * resets text size and width of all module text fields of given field * type to current settings in Preferences->Dimensions->Texts and Drawings. - * @param aType is the field type (TEXT_is_REFERENCE, TEXT_is_VALUE, or TEXT_is_DIVERS). - * @param aDC is the drawing context. + * @param aFilter is a filter: footprint names must match this filter. + * an empty filter, or "*" do not filter anything. + * @param aRef = true to modify the reference of footprints. + * @param aValue = true to modify the value of footprints. + * @param aOthers = true to modify the other fields of footprints. */ - void ResetModuleTextSizes( int aType, wxDC* aDC ); + void ResetModuleTextSizes( const wxString & aFilter, bool aRef, + bool aValue, bool aOthers ); void InstallPadOptionsFrame( D_PAD* pad ); void InstallTextModOptionsFrame( TEXTE_MODULE* TextMod, wxDC* DC ); diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index e550c18f6e..c7acd0093c 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -481,6 +481,13 @@ public: void Tracks_and_Vias_Size_Event( wxCommandEvent& event ); void OnSelectTool( wxCommandEvent& aEvent ); + /** + * Function OnResetModuleTextSizes + * resets text size and width of all module text fields of given field + * type to current settings in Preferences + */ + void OnResetModuleTextSizes( wxCommandEvent& event ); + void ProcessMuWaveFunctions( wxCommandEvent& event ); void MuWaveCommand( wxDC* DC, const wxPoint& MousePos ); diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index dbe64d2766..0b668f2d0a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -50,6 +50,8 @@ set(PCBNEW_DIALOGS dialogs/dialog_general_options_BoardEditor_base.cpp dialogs/dialog_global_edit_tracks_and_vias.cpp dialogs/dialog_global_edit_tracks_and_vias_base.cpp + dialogs/dialog_global_modules_fields_edition.cpp + dialogs/dialog_global_modules_fields_edition_base.cpp dialogs/dialog_global_pads_edition_base.cpp dialogs/dialog_graphic_items_options.cpp dialogs/dialog_graphic_items_options_base.cpp diff --git a/pcbnew/dialogs/dialog_design_rules_base.fbp b/pcbnew/dialogs/dialog_design_rules_base.fbp index d8f1ee15d0..cc33864e2d 100644 --- a/pcbnew/dialogs/dialog_design_rules_base.fbp +++ b/pcbnew/dialogs/dialog_design_rules_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -15,9 +15,9 @@ none 1 dialog_design_rules_base - + . - + 1 1 1 @@ -28,15 +28,15 @@ 1 1 0 - - - - + + + + 1 - + 0 1 - + 1 0 Dock @@ -44,82 +44,82 @@ Left 1 impl_virtual - - + + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 -1,-1 1 DIALOG_DESIGN_RULES_BASE 1 - - + + 1 - - + + Resizable - + 1 777,697 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + Design Rules Editor 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bMainSizer wxVERTICAL none @@ -132,85 +132,85 @@ 1 1 1 - - - - - + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 - + 1 m_DRnotebook 1 - - + + protected 1 - - + + Resizable - + 1 - + wxNB_TOP - + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + Net Classes Editor 1 @@ -218,81 +218,81 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 - + 1 m_panelNetClassesEditor 1 - - + + protected 1 - - + + Resizable - + 1 - - + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + bpanelNetClassesSizer wxVERTICAL none @@ -303,11 +303,11 @@ wxID_ANY Net Classes: - + sbSizerUpper wxVERTICAL none - + 5 wxEXPAND @@ -317,17 +317,17 @@ 1 1 1 - + 0 1 - - - + + + 1 - - + + wxALIGN_LEFT - + wxALIGN_TOP 0 1 @@ -337,7 +337,7 @@ wxALIGN_CENTRE 6 100,120,84,85,81,90 - + 1 0 Dock @@ -349,110 +349,110 @@ 1 1 1 - + 1 - - + + 1 0 0 wxID_ANY - - - - + + + + 0 0 - + 0 - - + + 0 -1,-1 1 m_grid 1 - - + + protected 1 - - + + Resizable - + wxALIGN_LEFT 120 "Default" wxALIGN_CENTRE - + 1 1 - - + + 0 Net Class parameters - + wxFILTER_NONE wxDefaultValidator - - - + + + wxHSCROLL|wxSIMPLE_BORDER|wxVSCROLL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnNetClassesNameLeftClick - + OnNetClassesNameRightClick - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -460,7 +460,7 @@ wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT 0 - + buttonBoxSizer wxHORIZONTAL none @@ -473,14 +473,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -488,68 +488,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ADD_NETCLASS Add - - + + 0 - - + + 0 - + 1 m_addButton 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 Add another Net Class - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnAddNetclassClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -561,14 +561,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -576,68 +576,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_REMOVE_NETCLASS Remove - - + + 0 - - + + 0 - + 1 m_removeButton 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 Remove the currently select Net Class The default Net Class cannot be removed - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnRemoveNetclassClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -649,14 +649,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -664,68 +664,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Move Up - - + + 0 - - + + 0 - + 1 m_moveUpButton 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 Move the currently selected Net Class up one row - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnMoveUpSelectedNetClass - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -739,17 +739,17 @@ wxID_ANY Membership: - + sbSizerNetSelectMain wxHORIZONTAL none - + 5 wxEXPAND|wxRIGHT|wxLEFT 1 - + leftNetSelectBoxSizer wxVERTICAL none @@ -762,85 +762,85 @@ 1 1 1 - - - - + + + + 1 0 - + 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 - + 1 m_leftClassChoice 1 - - + + protected 1 - - + + Resizable - + 1 - + wxCB_READONLY - + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - + + + + + + OnLeftCBSelection - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -852,100 +852,100 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 220,200 1 m_leftListCtrl 1 - - + + protected 1 - - + + Resizable - + 1 - + wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES NETS_LIST_CTRL; dialog_design_rules_aux_helper_class.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - + + + wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -955,7 +955,7 @@ wxALIGN_CENTER_VERTICAL 0 - + bmiddleSizerNetSelect wxVERTICAL none @@ -968,14 +968,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -983,68 +983,68 @@ 0 Left 1 - + 1 - + 0 0 ID_LEFT_TO_RIGHT_COPY <<< - - + + 0 - - + + 0 - + 1 m_buttonRightToLeft 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 Move the selected nets in the right list to the left list - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnRightToLeftCopyButton - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1056,14 +1056,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -1071,68 +1071,68 @@ 0 Left 1 - + 1 - + 0 0 ID_RIGHT_TO_LEFT_COPY >>> - - + + 0 - - + + 0 - + 1 m_buttonLeftToRight 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 Move the selected nets in the left list to the right list - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnLeftToRightCopyButton - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1144,14 +1144,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -1159,68 +1159,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY << Select All - - + + 0 - - + + 0 - + 1 m_buttonLeftSelAll 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 Select all nets in the left list - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnLeftSelectAllButton - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1232,14 +1232,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -1247,68 +1247,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Select All >> - - + + 0 - - + + 0 - + 1 m_buttonRightSelAll 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 Select all nets in the right list - + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnRightSelectAllButton - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1318,7 +1318,7 @@ wxEXPAND|wxRIGHT|wxLEFT 1 - + rghtNetSelectBoxSizer wxVERTICAL none @@ -1331,85 +1331,85 @@ 1 1 1 - - - - + + + + 1 0 - + 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 - + 1 m_rightClassChoice 1 - - + + protected 1 - - + + Resizable - + 1 - + wxCB_READONLY - + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - + + + + + + OnRightCBSelection - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @@ -1421,100 +1421,100 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 220,-1 1 m_rightListCtrl 1 - - + + protected 1 - - + + Resizable - + 1 - + wxLC_HRULES|wxLC_REPORT|wxLC_VIRTUAL|wxLC_VRULES NETS_LIST_CTRL; dialog_design_rules_aux_helper_class.h 0 - - + + wxFILTER_NONE wxDefaultValidator - - - + + + wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1525,7 +1525,7 @@ - + Global Design Rules 0 @@ -1533,81 +1533,81 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 - + 1 m_panelGolbalDesignRules 1 - - + + protected 1 - - + + Resizable - + 1 - - + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - + + + wxSUNKEN_BORDER|wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - + bpanelGlobRulesSizer wxVERTICAL none @@ -1616,7 +1616,7 @@ wxEXPAND 0 - + bDesignRulesUpperSizer wxHORIZONTAL none @@ -1627,11 +1627,11 @@ wxID_ANY Via Options: - + sbViasOptionSizer wxVERTICAL none - + 5 wxALL|wxEXPAND @@ -1641,85 +1641,85 @@ 1 1 1 - - - - + + + + 1 0 "Through via" "Blind or buried via" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Default Via Type - + 1 - + 0 - - + + 0 - + 1 m_OptViaType 1 - - + + protected 1 - - + + Resizable - + 0 1 - + wxRA_SPECIFY_COLS - + 0 Select the current via type. Trough via is the usual selection - + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1731,85 +1731,85 @@ 1 1 1 - - - - + + + + 1 0 "Do not allow micro vias" "Allow micro vias" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Micro Vias: - + 1 - + 0 - - + + 0 - + 1 m_AllowMicroViaCtrl 1 - - + + protected 1 - - + + Resizable - + 0 1 - + wxRA_SPECIFY_COLS - + 0 Allows or do not allow use of micro vias They are very small vias only from an external copper layer to its near neightbour - + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1821,11 +1821,11 @@ wxID_ANY Minimum Allowed Values: - + sbMinSizesSizer wxVERTICAL none - + 5 wxEXPAND @@ -1834,9 +1834,9 @@ 2 wxBOTH 1 - + 0 - + fgMinValuesSizer wxFLEX_GROWMODE_SPECIFIED none @@ -1851,82 +1851,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Min track width - - + + 0 - - + + 0 - + 1 m_TrackMinWidthTitle 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -1938,86 +1938,86 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - + 0 - + 0 - + 1 m_SetTrackMinWidthCtrl 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2029,82 +2029,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Min via diameter - - + + 0 - - + + 0 - + 1 m_ViaMinTitle 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2116,86 +2116,86 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - + 0 - + 0 - + 1 m_SetViasMinSizeCtrl 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2207,82 +2207,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Min via drill dia - - + + 0 - - + + 0 - + 1 m_ViaMinDrillTitle 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2294,86 +2294,86 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - + 0 - + 0 - + 1 m_SetViasMinDrillCtrl 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2385,82 +2385,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Min uvia diameter - - + + 0 - - + + 0 - + 1 m_MicroViaMinSizeTitle 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2472,86 +2472,86 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - + 6 - + 0 - + 1 m_SetMicroViasMinSizeCtrl 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2563,82 +2563,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Min uvia drill dia - - + + 0 - - + + 0 - + 1 m_MicroViaMinDrillTitle 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2650,86 +2650,86 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - + 6 - + 0 - + 1 m_SetMicroViasMinDrillCtrl 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2747,80 +2747,80 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 - + 1 m_staticline1 1 - - + + protected 1 - - + + Resizable - + 1 - + wxLI_HORIZONTAL - + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2832,82 +2832,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Specific via diameters and track widths, which can be used to replace default Netclass values on demand, for arbitrary via or track segments. - - + + 0 - - + + 0 - + 1 m_staticTextInfo 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -2915,7 +2915,7 @@ wxALIGN_CENTER_HORIZONTAL|wxEXPAND 0 - + bDesignRulesLowerSizer wxHORIZONTAL none @@ -2926,11 +2926,11 @@ wxID_ANY Custom Via Sizes: - + sViaSizeBox wxVERTICAL none - + 5 wxALL @@ -2940,82 +2940,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Drill value: a blank or 0 => default Netclass value - - + + 0 - - + + 0 - + 1 m_staticText7 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3027,17 +3027,17 @@ 1 1 1 - + 0 0 - - - + + + 1 - - + + wxALIGN_LEFT - + wxALIGN_TOP 0 1 @@ -3046,8 +3046,8 @@ "Diameter" "Drill" wxALIGN_CENTRE 2 - - + + 1 0 Dock @@ -3059,110 +3059,110 @@ 1 1 1 - + 1 - - + + 1 0 0 wxID_ANY - - - - + + + + 0 0 - + 0 - - + + 0 - + 1 m_gridViaSizeList 1 - - + + protected 1 - - + + Resizable - + wxALIGN_CENTRE 80 "Via 1" "Via 2" "Via 3" "Via 4" "Via 5" "Via 6" "Via 7" "Via 8" "Via 9" "Via 10" "Via 11" "Via 12" wxALIGN_CENTRE - + 12 1 - - + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3174,11 +3174,11 @@ wxID_ANY Custom Track Widths: - + sbTracksListSizer wxVERTICAL none - + 5 wxALL @@ -3188,82 +3188,82 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - - + + + 0 - - + + 0 - + 1 m_staticText8 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3275,17 +3275,17 @@ 1 1 1 - + 0 0 - - - + + + 1 - - + + wxALIGN_LEFT - + wxALIGN_TOP 0 1 @@ -3294,8 +3294,8 @@ "Width" wxALIGN_CENTRE 1 - - + + 1 0 Dock @@ -3307,37 +3307,37 @@ 1 1 1 - + 1 - - + + 1 0 0 wxID_ANY - - - - + + + + 0 0 - + 0 - - + + 0 - + 1 m_gridTrackWidthList 1 - - + + protected 1 - - + + Resizable - + wxALIGN_CENTRE 80 "Track 1" "Track 2" "Track 3" "Track 4" "Track 5" "Track 6" "Track 7" "Track 8" "Track 9" "Track 10" "Track 11" "Track 12" @@ -3345,72 +3345,72 @@ 17,17,17,17,17,17,17,17,17,17,17,17 12 1 - - + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3429,11 +3429,11 @@ wxID_ANY Messages: - + sbSizer2 wxHORIZONTAL none - + 5 wxEXPAND @@ -3443,91 +3443,91 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 -1,90 1 m_MessagesList 1 - - + + protected 1 - - + + Resizable - + 1 - + wxHW_SCROLLBAR_AUTO - + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - + + + wxSUNKEN_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 5 - + 0 - + bSizerButtons wxVERTICAL none @@ -3540,14 +3540,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 1 0 @@ -3555,68 +3555,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_OK OK - - + + 0 - - + + 0 - + 1 m_buttonOk 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnOkButtonClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -3628,14 +3628,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -3643,68 +3643,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_CANCEL Cancel - - + + 0 - - + + 0 - + 1 m_buttonCancel 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnCancelButtonClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp new file mode 100644 index 0000000000..98dde3e24c --- /dev/null +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition.cpp @@ -0,0 +1,240 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + +/** + * @file dialog_global_modules_fields_edition.cpp + * @brief global module fields edition. + */ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include +#include + + +// The dialog to set options for global fields edition: +// optionas are: +// edited fields (ref, value, others +// the footprint filter, for selective edition +class DIALOG_GLOBAL_MODULES_FIELDS_EDITION : public DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE +{ + PCB_EDIT_FRAME* m_parent; + BOARD_DESIGN_SETTINGS* m_brdSettings; + // Static variable to remember options, withing a session: + static bool m_refSelection; + static bool m_valueSelection; + static bool m_othersSelection; + static wxString m_filterString; + + +public: + DIALOG_GLOBAL_MODULES_FIELDS_EDITION( PCB_EDIT_FRAME* parent ) + : DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE( parent ) + { + m_parent = parent; + initDialog(); + GetSizer()->SetSizeHints( this ); + } + +private: + void initDialog(); + + // event handlers + void OnOKClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ) + { + EndModal( wxID_CANCEL ); + } +}; + +bool DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_refSelection = false; +bool DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_valueSelection = false; +bool DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_othersSelection = false; +wxString DIALOG_GLOBAL_MODULES_FIELDS_EDITION::m_filterString; + +void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::initDialog() +{ + SetFocus(); + + m_brdSettings = &m_parent->GetDesignSettings(); + + m_ReferenceOpt->SetValue(m_refSelection), + m_ValueOpt->SetValue(m_valueSelection), + m_OtherFields->SetValue(m_othersSelection); + m_ModuleFilter->SetValue(m_filterString); + m_SizeXunit->SetLabel( GetAbbreviatedUnitsLabel() ); + m_SizeYunit->SetLabel( GetAbbreviatedUnitsLabel() ); + m_Ticknessunit->SetLabel( GetAbbreviatedUnitsLabel() ); + m_SizeX_Value->SetValue( + ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.x ) ); + m_SizeY_Value->SetValue( + ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextSize.y ) ); + m_TicknessValue->SetValue( + ReturnStringFromValue( g_UserUnit, m_brdSettings->m_ModuleTextWidth) ); +} + + +void DIALOG_GLOBAL_MODULES_FIELDS_EDITION::OnOKClick( wxCommandEvent& event ) +{ + m_refSelection = m_ReferenceOpt->GetValue(); + m_valueSelection = m_ValueOpt->GetValue(); + m_othersSelection = m_OtherFields->GetValue(); + m_filterString = m_ModuleFilter->GetValue(); + + m_brdSettings->m_ModuleTextSize.x = ReturnValueFromTextCtrl( *m_SizeX_Value ); + m_brdSettings->m_ModuleTextSize.y = ReturnValueFromTextCtrl( *m_SizeY_Value ); + m_brdSettings->m_ModuleTextWidth = ReturnValueFromTextCtrl( *m_TicknessValue ); + + // clip m_ModuleTextWidth to the 1/4 of min size, to keep it always readable + int minsize = min( m_brdSettings->m_ModuleTextSize.x, + m_brdSettings->m_ModuleTextSize.y ) / 4; + if( m_brdSettings->m_ModuleTextWidth > minsize ) + m_brdSettings->m_ModuleTextWidth = minsize; + + m_parent->ResetModuleTextSizes( m_filterString, m_refSelection, + m_valueSelection, m_othersSelection ); + EndModal( wxID_OK ); +} + + +void PCB_EDIT_FRAME::OnResetModuleTextSizes( wxCommandEvent& event ) +{ + DIALOG_GLOBAL_MODULES_FIELDS_EDITION dlg(this); + dlg.ShowModal(); + + m_canvas->Refresh(); +} + +void PCB_BASE_FRAME::ResetModuleTextSizes( const wxString & aFilter, bool aRef, + bool aValue, bool aOthers ) +{ + MODULE* module; + BOARD_ITEM* boardItem; + TEXTE_MODULE* item; + ITEM_PICKER itemWrapper( NULL, UR_CHANGED ); + PICKED_ITEMS_LIST undoItemList; + unsigned int ii; + + // Prepare undo list + for( module = GetBoard()->m_Modules; module; module = module->Next() ) + { + itemWrapper.SetItem( module ); + + if( ! aFilter.IsEmpty() ) + { + if( ! WildCompareString( aFilter, module->GetLibRef(), false ) ) + continue; + } + + + if( aRef ) + { + item = module->m_Reference; + + if( item->GetSize() != GetDesignSettings().m_ModuleTextSize || + item->GetThickness() != GetDesignSettings().m_ModuleTextWidth ) + { + undoItemList.PushItem( itemWrapper ); + } + } + + if( aValue ) + { + item = module->m_Value; + + if( item->GetSize() != GetDesignSettings().m_ModuleTextSize || + item->GetThickness() != GetDesignSettings().m_ModuleTextWidth ) + { + undoItemList.PushItem( itemWrapper ); + } + } + + if( aOthers ) + { + // Go through all other module text fields + for( boardItem = module->m_Drawings; boardItem; boardItem = boardItem->Next() ) + { + if( boardItem->Type() == PCB_MODULE_TEXT_T ) + { + item = (TEXTE_MODULE*) boardItem; + + if( item->GetSize() != GetDesignSettings().m_ModuleTextSize + || item->GetThickness() != GetDesignSettings().m_ModuleTextWidth ) + { + undoItemList.PushItem( itemWrapper ); + } + } + } + } + } + + // Exit if there's nothing to do + if( !undoItemList.GetCount() ) + return; + + SaveCopyInUndoList( undoItemList, UR_CHANGED ); + + // Apply changes to modules in the undo list + for( ii = 0; ii < undoItemList.GetCount(); ii++ ) + { + module = (MODULE*) undoItemList.GetPickedItem( ii ); + + if( aRef ) + { + module->m_Reference->SetThickness( GetDesignSettings().m_ModuleTextWidth ); + module->m_Reference->SetSize( GetDesignSettings().m_ModuleTextSize ); + } + + if( aValue ) + { + module->m_Value->SetThickness( GetDesignSettings().m_ModuleTextWidth ); + module->m_Value->SetSize( GetDesignSettings().m_ModuleTextSize ); + } + + if( aOthers ) + { + for( boardItem = module->m_Drawings; boardItem; boardItem = boardItem->Next() ) + { + if( boardItem->Type() == PCB_MODULE_TEXT_T ) + { + item = (TEXTE_MODULE*) boardItem; + item->SetThickness( GetDesignSettings().m_ModuleTextWidth ); + item->SetSize( GetDesignSettings().m_ModuleTextSize ); + } + } + } + } + + OnModify(); +} diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp new file mode 100644 index 0000000000..e304301bdf --- /dev/null +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.cpp @@ -0,0 +1,137 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_global_modules_fields_edition_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizerUpper; + bSizerUpper = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bLeftSizer; + bLeftSizer = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizer1; + sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Fields:") ), wxVERTICAL ); + + m_ReferenceOpt = new wxCheckBox( this, wxID_ANY, _("Modify reference"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer1->Add( m_ReferenceOpt, 0, wxALL, 5 ); + + m_ValueOpt = new wxCheckBox( this, wxID_ANY, _("Modify value"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer1->Add( m_ValueOpt, 0, wxALL, 5 ); + + m_OtherFields = new wxCheckBox( this, wxID_ANY, _("Modify other fields"), wxDefaultPosition, wxDefaultSize, 0 ); + sbSizer1->Add( m_OtherFields, 0, wxALL, 5 ); + + + bLeftSizer->Add( sbSizer1, 1, wxEXPAND|wxRIGHT, 5 ); + + m_staticTextFilter = new wxStaticText( this, wxID_ANY, _("Modules Filter:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextFilter->Wrap( -1 ); + m_staticTextFilter->SetToolTip( _("A string to filter modules to edit.\nIf not void, footprint names should match this filter.\nA filter can be something like SM* (case insensitive)") ); + + bLeftSizer->Add( m_staticTextFilter, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_ModuleFilter = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_ModuleFilter->SetMinSize( wxSize( 150,-1 ) ); + + bLeftSizer->Add( m_ModuleFilter, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + bSizerUpper->Add( bLeftSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bRightSizer; + bRightSizer = new wxBoxSizer( wxVERTICAL ); + + wxStaticBoxSizer* sbSizerSettings; + sbSizerSettings = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Current Design Settings:") ), wxVERTICAL ); + + wxFlexGridSizer* fgSizerCurrSettings; + fgSizerCurrSettings = new wxFlexGridSizer( 3, 3, 0, 0 ); + fgSizerCurrSettings->SetFlexibleDirection( wxBOTH ); + fgSizerCurrSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_staticText3 = new wxStaticText( this, wxID_ANY, _("Size X:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText3->Wrap( -1 ); + fgSizerCurrSettings->Add( m_staticText3, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + m_SizeX_Value = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerCurrSettings->Add( m_SizeX_Value, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SizeXunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SizeXunit->Wrap( -1 ); + fgSizerCurrSettings->Add( m_SizeXunit, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_staticText6 = new wxStaticText( this, wxID_ANY, _("Size Y:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText6->Wrap( -1 ); + fgSizerCurrSettings->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxALIGN_RIGHT, 5 ); + + m_SizeY_Value = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerCurrSettings->Add( m_SizeY_Value, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SizeYunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SizeYunit->Wrap( -1 ); + fgSizerCurrSettings->Add( m_SizeYunit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_staticText9 = new wxStaticText( this, wxID_ANY, _("Thickness:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText9->Wrap( -1 ); + fgSizerCurrSettings->Add( m_staticText9, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 ); + + m_TicknessValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerCurrSettings->Add( m_TicknessValue, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_Ticknessunit = new wxStaticText( this, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_Ticknessunit->Wrap( -1 ); + fgSizerCurrSettings->Add( m_Ticknessunit, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizerSettings->Add( fgSizerCurrSettings, 1, wxEXPAND, 5 ); + + + bRightSizer->Add( sbSizerSettings, 1, wxEXPAND|wxLEFT, 5 ); + + + bSizerUpper->Add( bRightSizer, 0, wxEXPAND, 5 ); + + + bMainSizer->Add( bSizerUpper, 1, wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + m_sdbSizerButtons = new wxStdDialogButtonSizer(); + m_sdbSizerButtonsOK = new wxButton( this, wxID_OK ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK ); + m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel ); + m_sdbSizerButtons->Realize(); + + bMainSizer->Add( m_sdbSizerButtons, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 ); + + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + m_sdbSizerButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::OnCancelClick ), NULL, this ); + m_sdbSizerButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::OnOKClick ), NULL, this ); +} + +DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::~DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE() +{ + // Disconnect Events + m_sdbSizerButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::OnCancelClick ), NULL, this ); + m_sdbSizerButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE::OnOKClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp new file mode 100644 index 0000000000..7df7114895 --- /dev/null +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.fbp @@ -0,0 +1,1492 @@ + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_global_modules_fields_edition_base + 1000 + none + 1 + dialog_global_modules_fields_edition + + . + + 1 + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE + + 482,199 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Global Module Fields Edition + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bMainSizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizerUpper + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bLeftSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxRIGHT + 1 + + wxID_ANY + Fields: + + sbSizer1 + wxVERTICAL + none + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Modify reference + + 0 + + + 0 + + 1 + m_ReferenceOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Modify value + + 0 + + + 0 + + 1 + m_ValueOpt + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Modify other fields + + 0 + + + 0 + + 1 + m_OtherFields + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Modules Filter: + + 0 + + + 0 + + 1 + m_staticTextFilter + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + A string to filter modules to edit. If not void, footprint names should match this filter. A filter can be something like SM* (case insensitive) + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + 150,-1 + 1 + m_ModuleFilter + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bRightSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxLEFT + 1 + + wxID_ANY + Current Design Settings: + + sbSizerSettings + wxVERTICAL + none + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + + + 0 + + fgSizerCurrSettings + wxFLEX_GROWMODE_SPECIFIED + none + 3 + 0 + + 5 + wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Size X: + + 0 + + + 0 + + 1 + m_staticText3 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SizeX_Value + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_SizeXunit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT|wxALIGN_RIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Size Y: + + 0 + + + 0 + + 1 + m_staticText6 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SizeY_Value + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_SizeYunit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Thickness: + + 0 + + + 0 + + 1 + m_staticText9 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_TicknessValue + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_Ticknessunit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerButtons + protected + + OnCancelClick + + + + OnOKClick + + + + + + + + diff --git a/pcbnew/dialogs/dialog_global_modules_fields_edition_base.h b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.h new file mode 100644 index 0000000000..d6d616cea1 --- /dev/null +++ b/pcbnew/dialogs/dialog_global_modules_fields_edition_base.h @@ -0,0 +1,71 @@ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Apr 10 2012) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE_H__ +#define __DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE_H__ + +#include +#include +#include +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE : public DIALOG_SHIM +{ + private: + + protected: + wxCheckBox* m_ReferenceOpt; + wxCheckBox* m_ValueOpt; + wxCheckBox* m_OtherFields; + wxStaticText* m_staticTextFilter; + wxTextCtrl* m_ModuleFilter; + wxStaticText* m_staticText3; + wxTextCtrl* m_SizeX_Value; + wxStaticText* m_SizeXunit; + wxStaticText* m_staticText6; + wxTextCtrl* m_SizeY_Value; + wxStaticText* m_SizeYunit; + wxStaticText* m_staticText9; + wxTextCtrl* m_TicknessValue; + wxStaticText* m_Ticknessunit; + wxStaticLine* m_staticline1; + wxStdDialogButtonSizer* m_sdbSizerButtons; + wxButton* m_sdbSizerButtonsOK; + wxButton* m_sdbSizerButtonsCancel; + + // Virtual event handlers, overide them in your derived class + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOKClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Global Module Fields Edition"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 482,199 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE(); + +}; + +#endif //__DIALOG_GLOBAL_MODULES_FIELDS_EDITION_BASE_H__ diff --git a/pcbnew/dialogs/dialog_global_pads_edition_base.fbp b/pcbnew/dialogs/dialog_global_pads_edition_base.fbp index f2a40819b7..16bbc2b08d 100644 --- a/pcbnew/dialogs/dialog_global_pads_edition_base.fbp +++ b/pcbnew/dialogs/dialog_global_pads_edition_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -15,9 +15,9 @@ none 1 dialog_global_pads_edition - + . - + 1 1 0 @@ -28,15 +28,15 @@ 1 1 0 - - - - + + + + 1 - + 0 1 - + 1 0 Dock @@ -44,82 +44,82 @@ Left 1 impl_virtual - - + + 1 - + 0 0 wxID_ANY - - + + 0 - - + + 0 - + 1 DIALOG_GLOBAL_PADS_EDITION_BASE 1 - - + + 1 - - + + Resizable - + 1 482,165 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + Global Pads Edition 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bMainSizer wxHORIZONTAL none @@ -128,7 +128,7 @@ wxEXPAND 1 - + bLeftSizer wxVERTICAL none @@ -139,11 +139,11 @@ wxID_ANY Pad Filter : - + sbSizer1 wxVERTICAL none - + 5 wxALL @@ -153,83 +153,83 @@ 1 1 1 - - - - + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Do not modify pads having a different shape - - + + 0 - - + + 0 - + 1 m_Pad_Shape_Filter_CB 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -241,83 +241,83 @@ 1 1 1 - - - - + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Do not modify pads having different layers - - + + 0 - - + + 0 - + 1 m_Pad_Layer_Filter_CB 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -329,83 +329,83 @@ 1 1 1 - - - - + + + + 1 0 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Do not modify pads having a different orientation - - + + 0 - - + + 0 - + 1 m_Pad_Orient_Filter_CB 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -417,7 +417,7 @@ wxEXPAND 0 - + bRightSizer wxVERTICAL none @@ -430,14 +430,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -445,73 +445,73 @@ 0 Left 1 - + 1 - + 0 0 ID_CHANGE_GET_PAD_SETTINGS Pad Editor - - + + 0 - - + + 0 - + 1 m_buttonPadEditor 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + InstallPadEditor - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + 5 - + 0 10 @@ -528,14 +528,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -543,68 +543,68 @@ 0 Left 1 - + 1 - + 0 0 ID_CHANGE_CURRENT_MODULE Change Pads on Module - - + + 0 - - + + 0 - + 1 m_buttonChangeModule 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + PadPropertiesAccept - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -616,14 +616,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -631,68 +631,68 @@ 0 Left 1 - + 1 - + 0 0 ID_CHANGE_ID_MODULES Change Pads on Same Modules - - + + 0 - - + + 0 - + 1 m_buttonIdModules 1 - - + + public 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + PadPropertiesAccept - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -704,14 +704,14 @@ 1 1 1 - - - - + + + + 1 0 1 - + 1 0 0 @@ -719,68 +719,68 @@ 0 Left 1 - + 1 - + 0 0 wxID_ANY Cancel - - + + 0 - - + + 0 - + 1 m_buttonCancel 1 - - + + protected 1 - - + + Resizable - + 1 - - - + + + 0 - - + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnCancelClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index d9127490a7..c21616962d 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -1078,14 +1078,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Swap_Layers( event ); break; - case ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES: - ResetModuleTextSizes( TEXT_is_REFERENCE, &dc ); - break; - - case ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES: - ResetModuleTextSizes( TEXT_is_VALUE, &dc ); - break; - case ID_PCB_USER_GRID_SETUP: InstallGridFrame( pos ); break; diff --git a/pcbnew/edtxtmod.cpp b/pcbnew/edtxtmod.cpp index 5ffea421b9..836dd677f9 100644 --- a/pcbnew/edtxtmod.cpp +++ b/pcbnew/edtxtmod.cpp @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 1992-2011 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2012 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr + * Copyright (C) 1992-2012 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -37,7 +37,7 @@ #include #include -#include +#include #include #include @@ -356,107 +356,3 @@ void PCB_BASE_FRAME::ResetTextSize( BOARD_ITEM* aItem, wxDC* aDC ) OnModify(); } - -void PCB_BASE_FRAME::ResetModuleTextSizes( int aType, wxDC* aDC ) -{ - MODULE* module; - BOARD_ITEM* boardItem; - TEXTE_MODULE* item; - ITEM_PICKER itemWrapper( NULL, UR_CHANGED ); - PICKED_ITEMS_LIST undoItemList; - unsigned int ii; - - module = GetBoard()->m_Modules; - - // Prepare undo list - while( module ) - { - itemWrapper.SetItem( module ); - - switch( aType ) - { - case TEXT_is_REFERENCE: - item = module->m_Reference; - - if( item->GetSize() != GetDesignSettings().m_ModuleTextSize || item->GetThickness() != GetDesignSettings().m_ModuleTextWidth ) - undoItemList.PushItem( itemWrapper ); - - break; - - case TEXT_is_VALUE: - item = module->m_Value; - - if( item->GetSize() != GetDesignSettings().m_ModuleTextSize || - item->GetThickness() != GetDesignSettings().m_ModuleTextWidth ) - undoItemList.PushItem( itemWrapper ); - - break; - - case TEXT_is_DIVERS: - // Go through all other module text fields - for( boardItem = module->m_Drawings; boardItem; boardItem = boardItem->Next() ) - { - if( boardItem->Type() == PCB_MODULE_TEXT_T ) - { - item = (TEXTE_MODULE*) boardItem; - - if( item->GetSize() != GetDesignSettings().m_ModuleTextSize - || item->GetThickness() != GetDesignSettings().m_ModuleTextWidth ) - { - undoItemList.PushItem( itemWrapper ); - break; - } - } - } - - break; - - default: - break; - } - module = module->Next(); - } - - // Exit if there's nothing to do - if( !undoItemList.GetCount() ) - return; - - SaveCopyInUndoList( undoItemList, UR_CHANGED ); - - // Apply changes to modules in the undo list - for( ii = 0; ii < undoItemList.GetCount(); ii++ ) - { - module = (MODULE*) undoItemList.GetPickedItem( ii ); - - switch( aType ) - { - case TEXT_is_REFERENCE: - module->m_Reference->SetThickness( GetDesignSettings().m_ModuleTextWidth ); - module->m_Reference->SetSize( GetDesignSettings().m_ModuleTextSize ); - break; - - case TEXT_is_VALUE: - module->m_Value->SetThickness( GetDesignSettings().m_ModuleTextWidth ); - module->m_Value->SetSize( GetDesignSettings().m_ModuleTextSize ); - break; - - case TEXT_is_DIVERS: - for( boardItem = module->m_Drawings; boardItem; boardItem = boardItem->Next() ) - { - if( boardItem->Type() == PCB_MODULE_TEXT_T ) - { - item = (TEXTE_MODULE*) boardItem; - item->SetThickness( GetDesignSettings().m_ModuleTextWidth ); - item->SetSize( GetDesignSettings().m_ModuleTextSize ); - } - } - - break; - } - } - - if( aDC ) - m_canvas->Refresh(); - - OnModify(); -} diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 5df5fee5e4..8e8877dab9 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -295,15 +295,9 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() KiBitmap( swap_layer_xpm ) ); // Reset module reference sizes - AddMenuItem( editMenu, ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES, - _( "Reset Module &Reference Sizes" ), - _( "Reset text size and width of all module references to current defaults" ), - KiBitmap( reset_text_xpm ) ); - - // Reset module value sizes - AddMenuItem( editMenu, ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES, - _( "Reset Module &Value Sizes" ), - _( "Reset text size and width of all module values to current defaults" ), + AddMenuItem( editMenu, ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES, + _( "&Reset Module Field Sizes" ), + _( "Reset text size and width of all module fields to current defaults" ), KiBitmap( reset_text_xpm ) ); /** Create View menu **/ diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index b64fd4ddf0..2af5e03aff 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -135,10 +135,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_PCB_GLOBAL_DELETE, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_MENU_PCB_CLEAN, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_MENU_PCB_SWAP_LAYERS, PCB_EDIT_FRAME::Process_Special_Functions ) - EVT_MENU( ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES, - PCB_EDIT_FRAME::Process_Special_Functions ) - EVT_MENU( ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES, - PCB_EDIT_FRAME::Process_Special_Functions ) + EVT_MENU( ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES, + PCB_EDIT_FRAME::OnResetModuleTextSizes ) // Menu Help EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 88bf2da19c..7f49e0bf3d 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -219,8 +219,7 @@ enum pcbnew_ids ID_MENU_LIST_NETS, ID_MENU_PCB_CLEAN, ID_MENU_PCB_SWAP_LAYERS, - ID_MENU_PCB_RESET_TEXTMODULE_REFERENCE_SIZES, - ID_MENU_PCB_RESET_TEXTMODULE_VALUE_SIZES, + ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES, ID_GEN_EXPORT_FILE_VRML, ID_GEN_EXPORT_SPECCTRA,