diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp index 8d4eb78a2d..6a3ffcc64f 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics.cpp @@ -399,6 +399,9 @@ void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem( BOARD_COMMIT& aCommit, B if( m_keepUpright->Get3StateValue() != wxCHK_UNDETERMINED ) text->SetKeepUpright( m_keepUpright->GetValue() ); + + if( m_centerOnFP->GetValue() == wxCHK_CHECKED ) + text->SetTextPos( text->GetParent()->GetCenter() ); } } diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.cpp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.cpp index ba3b3819fc..f5566f2a8b 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.cpp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -241,6 +241,12 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ fgSizer1->Add( m_ThicknessUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + fgSizer1->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 20 ); + + m_centerOnFP = new wxCheckBox( m_specifiedValues, wxID_ANY, _("Center on footprint"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer1->Add( m_centerOnFP, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 120 ); + + bSizer2->Add( fgSizer1, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 ); diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.fbp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.fbp index aaa7fd7784..700ba6f277 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.fbp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.fbp @@ -56,21 +56,21 @@ - + bMainSizer wxVERTICAL none - + 5 wxEXPAND 1 - + bSizerTop wxHORIZONTAL none - + 10 wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 @@ -338,11 +338,11 @@ - + 4 wxBOTTOM|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -541,11 +541,11 @@ - + 4 wxBOTTOM|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -608,7 +608,7 @@ - + 10 wxEXPAND|wxTOP|wxRIGHT|wxLEFT 1 @@ -1114,31 +1114,31 @@ - + 5 wxTOP 0 - + 0 protected 0 - + 5 wxTOP 0 - + 0 protected 0 - + 10 wxEXPAND|wxLEFT|wxRIGHT 0 - + wxID_ANY Action @@ -1211,11 +1211,11 @@ onActionButtonChange - + 18 wxEXPAND|wxBOTTOM|wxLEFT 0 - + 1 1 1 @@ -1266,16 +1266,16 @@ wxTAB_TRAVERSAL - + bSizer2 wxVERTICAL none - + 5 wxBOTTOM|wxEXPAND|wxTOP 1 - + 5 wxBOTH 1,4 @@ -1756,11 +1756,11 @@ 0 - + 5 wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL 0 - + 1 1 1 @@ -1817,11 +1817,11 @@ -1 - + 5 wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND 0 - + 1 1 1 @@ -1882,31 +1882,31 @@ onFontSelected - + 5 wxEXPAND 1 - + 0 protected 0 - + 5 wxEXPAND 1 - + 0 protected 0 - + 120 wxEXPAND|wxLEFT|wxALIGN_CENTER_VERTICAL 0 - + 1 1 1 @@ -2675,6 +2675,80 @@ -1 + + 20 + wxEXPAND|wxLEFT|wxRIGHT + 0 + + 0 + protected + 0 + + + + 120 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Center on footprint + + 0 + + + 0 + + 1 + m_centerOnFP + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + @@ -2846,11 +2920,11 @@ - + 5 wxALL|wxEXPAND 0 - + 1 1 0 diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h index d33f17c9cb..a64e1b8986 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b) +// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -82,6 +82,7 @@ class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE : public DIALOG_SHIM wxStaticText* m_ThicknessLabel; wxTextCtrl* m_ThicknessCtrl; wxStaticText* m_ThicknessUnit; + wxCheckBox* m_centerOnFP; wxRadioButton* m_setToLayerDefaults; wxGrid* m_grid; wxStdDialogButtonSizer* m_sdbSizerButtons;