From 9ce6c2be8086865e5a9218185e14d040b2948299 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 10 Jan 2021 16:37:06 +0000 Subject: [PATCH] Group global editors under tools menu. Also improves some terminology in Remove Unused Pads. --- pcbnew/dialogs/dialog_unused_pad_layers.fbp | 4 ++-- pcbnew/dialogs/dialog_unused_pad_layers_base.cpp | 4 ++-- pcbnew/menubar_pcb_editor.cpp | 10 ++++++---- pcbnew/tools/pcb_actions.cpp | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pcbnew/dialogs/dialog_unused_pad_layers.fbp b/pcbnew/dialogs/dialog_unused_pad_layers.fbp index 13f27401ee..575684b5c2 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers.fbp +++ b/pcbnew/dialogs/dialog_unused_pad_layers.fbp @@ -167,7 +167,7 @@ 1 0 - "&Remove unused layers" "&Keep unused layers" + "&Remove unused layers" "Res&tore unused layers" 1 1 @@ -199,7 +199,7 @@ 1 Resizable - 0 + 1 1 wxRA_SPECIFY_COLS diff --git a/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp b/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp index 1b1a32534f..3e96cc8ee6 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp +++ b/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp @@ -29,10 +29,10 @@ DIALOG_UNUSED_PAD_LAYERS_BASE::DIALOG_UNUSED_PAD_LAYERS_BASE( wxWindow* parent, m_rbScope->SetSelection( 0 ); fgSizerProps->Add( m_rbScope, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - wxString m_rbActionChoices[] = { _("&Remove unused layers"), _("&Keep unused layers") }; + wxString m_rbActionChoices[] = { _("&Remove unused layers"), _("Res&tore unused layers") }; int m_rbActionNChoices = sizeof( m_rbActionChoices ) / sizeof( wxString ); m_rbAction = new wxRadioBox( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, m_rbActionNChoices, m_rbActionChoices, 1, wxRA_SPECIFY_COLS ); - m_rbAction->SetSelection( 0 ); + m_rbAction->SetSelection( 1 ); fgSizerProps->Add( m_rbAction, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); m_cbSelectedOnly = new wxCheckBox( this, wxID_ANY, _("&Selection only"), wxDefaultPosition, wxDefaultSize, 0 ); diff --git a/pcbnew/menubar_pcb_editor.cpp b/pcbnew/menubar_pcb_editor.cpp index 058a8456f9..d4d47778ad 100644 --- a/pcbnew/menubar_pcb_editor.cpp +++ b/pcbnew/menubar_pcb_editor.cpp @@ -220,8 +220,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() editMenu->AppendSeparator(); editMenu->Add( ACTIONS::deleteTool ); editMenu->Add( PCB_ACTIONS::globalDeletions ); - editMenu->Add( PCB_ACTIONS::cleanupTracksAndVias ); - editMenu->Add( PCB_ACTIONS::cleanupGraphics ); //----- View menu ----------------------------------------------------------- @@ -381,7 +379,6 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() ACTION_MENU* toolsMenu = new ACTION_MENU( false, selTool ); toolsMenu->Add( ACTIONS::updatePcbFromSchematic ); - toolsMenu->Add( ACTIONS::updateSchematicFromPcb ); toolsMenu->Add( PCB_ACTIONS::showEeschema ); toolsMenu->AppendSeparator(); @@ -389,10 +386,15 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() toolsMenu->Add( PCB_ACTIONS::updateFootprints ); toolsMenu->AppendSeparator(); - toolsMenu->Add( PCB_ACTIONS::boardReannotate ); + toolsMenu->Add( PCB_ACTIONS::cleanupTracksAndVias ); toolsMenu->Add( PCB_ACTIONS::removeUnusedPads ); + toolsMenu->Add( PCB_ACTIONS::cleanupGraphics ); toolsMenu->Add( PCB_ACTIONS::repairBoard ); + toolsMenu->AppendSeparator(); + toolsMenu->Add( PCB_ACTIONS::boardReannotate ); + toolsMenu->Add( ACTIONS::updateSchematicFromPcb ); + #if defined(KICAD_SCRIPTING_WXPYTHON) toolsMenu->AppendSeparator(); toolsMenu->Add( PCB_ACTIONS::showPythonConsole ); diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index 31787a30c2..0f87aaeacc 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -405,7 +405,7 @@ TOOL_ACTION PCB_ACTIONS::updateFootprints( "pcbnew.GlobalEdit.updateFootprints", TOOL_ACTION PCB_ACTIONS::removeUnusedPads( "pcbnew.GlobalEdit.removeUnusedPads", AS_GLOBAL, 0, "", _( "Remove Unused Pads..." ), - _( "Remove or reset the unconnected inner layers on through hole pads and vias" ), + _( "Remove or restore the unconnected inner layers on through hole pads and vias" ), pads_remove_xpm ); TOOL_ACTION PCB_ACTIONS::changeFootprint( "pcbnew.GlobalEdit.changeFootprint",