From 1ea9ad05bc44e48066ccf8c956ce8876d3f05b3c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 1 Aug 2019 13:21:56 -0600 Subject: [PATCH] More explicit text for Update PCB dialog. Fixes: lp:1838551 * https://bugs.launchpad.net/kicad/+bug/1838551 --- pcbnew/dialogs/dialog_update_pcb_base.cpp | 32 +- pcbnew/dialogs/dialog_update_pcb_base.fbp | 864 +++++++++++----------- pcbnew/dialogs/dialog_update_pcb_base.h | 1 + 3 files changed, 467 insertions(+), 430 deletions(-) diff --git a/pcbnew/dialogs/dialog_update_pcb_base.cpp b/pcbnew/dialogs/dialog_update_pcb_base.cpp index 10860a4b7e..a77b1ebfe6 100644 --- a/pcbnew/dialogs/dialog_update_pcb_base.cpp +++ b/pcbnew/dialogs/dialog_update_pcb_base.cpp @@ -19,27 +19,37 @@ DIALOG_UPDATE_PCB_BASE::DIALOG_UPDATE_PCB_BASE( wxWindow* parent, wxWindowID id, bMainSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bUpperSizer; - bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); + bUpperSizer = new wxBoxSizer( wxVERTICAL ); - wxString m_matchByTimestampChoices[] = { _("Keep existing symbol to footprint associations"), _("Re-associate footprints by reference") }; + wxString m_matchByTimestampChoices[] = { _("Update footprint references to match any changed symbol references"), _("Update footprint associations by existing references") }; int m_matchByTimestampNChoices = sizeof( m_matchByTimestampChoices ) / sizeof( wxString ); m_matchByTimestamp = new wxRadioBox( this, wxID_ANY, _("Match Method"), wxDefaultPosition, wxDefaultSize, m_matchByTimestampNChoices, m_matchByTimestampChoices, 1, wxRA_SPECIFY_COLS ); - m_matchByTimestamp->SetSelection( 0 ); - m_matchByTimestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") ); + m_matchByTimestamp->SetSelection( 1 ); + m_matchByTimestamp->SetToolTip( _("Footprint references are normally updated to follow edits in the schematic.\nHowever, updating footprint associations usually works better after re-annotating the schematic.\nFor best results, update footprint references before re-annotating, then re-annotate, and then update footprint associations.") ); - bUpperSizer->Add( m_matchByTimestamp, 1, wxALIGN_TOP|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bUpperSizer->Add( m_matchByTimestamp, 0, wxALIGN_TOP|wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxStaticBoxSizer* sbSizer1; sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Options") ), wxVERTICAL ); - m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Update footprints"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer1->Add( m_cbUpdateFootprints, 0, wxBOTTOM, 5 ); + wxGridBagSizer* gbSizer1; + gbSizer1 = new wxGridBagSizer( 2, 0 ); + gbSizer1->SetFlexibleDirection( wxBOTH ); + gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete extra footprints"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer1->Add( m_cbDeleteExtraFootprints, 0, wxBOTTOM, 5 ); + m_cbUpdateFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Replace footprints of symbols whose footprint assignments have changed"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbUpdateFootprints->SetToolTip( _("Used primarily after changing footprint assignments via Eeschema's Assign Footprints dialog (Cvpcb)") ); - m_cbDeleteSinglePadNets = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete single-pad nets"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizer1->Add( m_cbDeleteSinglePadNets, 0, wxBOTTOM, 5 ); + gbSizer1->Add( m_cbUpdateFootprints, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_cbDeleteExtraFootprints = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete footprints with no associated symbol"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_cbDeleteExtraFootprints, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_cbDeleteSinglePadNets = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Delete nets containing only a single pad"), wxDefaultPosition, wxDefaultSize, 0 ); + gbSizer1->Add( m_cbDeleteSinglePadNets, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + sbSizer1->Add( gbSizer1, 1, wxEXPAND, 5 ); bUpperSizer->Add( sbSizer1, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_update_pcb_base.fbp b/pcbnew/dialogs/dialog_update_pcb_base.fbp index 38b43b7c9e..27cac296a1 100644 --- a/pcbnew/dialogs/dialog_update_pcb_base.fbp +++ b/pcbnew/dialogs/dialog_update_pcb_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -16,9 +16,9 @@ none 1 dialog_update_pcb_base - + . - + 1 1 1 @@ -29,67 +29,67 @@ 0 wxAUI_MGR_DEFAULT - - - + + + 1 1 impl_virtual - - - + + + 0 wxID_ANY - + -1,-1 DIALOG_UPDATE_PCB_BASE - + -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Update PCB from Schematic - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bMainSizer wxVERTICAL none @@ -98,98 +98,98 @@ wxALL|wxEXPAND 0 - + bUpperSizer - wxHORIZONTAL + wxVERTICAL none 5 wxALIGN_TOP|wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 1 + 0 1 1 1 1 - - - - - - - + + + + + + + 1 0 - "Keep existing symbol to footprint associations" "Re-associate footprints by reference" + "Update footprint references to match any changed symbol references" "Update footprint associations by existing references" 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY Match Method 1 - + 0 - - + + 0 - + 1 m_matchByTimestamp 1 - - + + protected 1 - + Resizable - 0 + 1 1 - + wxRA_SPECIFY_COLS - + 0 - Select how footprints are recognized: by their reference (U1, R3...) (normal setting) or their time stamp (special setting after a full schematic reannotation) - + Footprint references are normally updated to follow edits in the schematic. However, updating footprint associations usually works better after re-annotating the schematic. For best results, update footprint references before re-annotating, then re-annotate, and then update footprint associations. + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + OnMatchChanged - - - - - - + + + + + + @@ -199,274 +199,300 @@ wxID_ANY Options - + sbSizer1 wxVERTICAL 1 none - + 5 - wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Update footprints - - 0 - - - 0 - - 1 - m_cbUpdateFootprints - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnOptionChanged - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Delete extra footprints - - 0 - - - 0 - - 1 - m_cbDeleteExtraFootprints - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnOptionChanged - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Delete single-pad nets - - 0 - - - 0 - - 1 - m_cbDeleteSinglePadNets - 1 - - - protected - 1 - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnOptionChanged - - - - - - - - - - - - - - - - - - - - - - + wxEXPAND + 1 + + + wxBOTH + + + 0 + + gbSizer1 + wxFLEX_GROWMODE_SPECIFIED + none + 2 + + 5 + 2 + 0 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Replace footprints of symbols whose footprint assignments have changed + + 0 + + + 0 + + 1 + m_cbUpdateFootprints + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + Used primarily after changing footprint assignments via Eeschema's Assign Footprints dialog (Cvpcb) + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnOptionChanged + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 0 + wxBOTTOM|wxRIGHT|wxLEFT + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Delete footprints with no associated symbol + + 0 + + + 0 + + 1 + m_cbDeleteExtraFootprints + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnOptionChanged + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + 1 + 1 + wxBOTTOM|wxRIGHT|wxLEFT + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Delete nets containing only a single pad + + 0 + + + 0 + + 1 + m_cbDeleteSinglePadNets + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnOptionChanged + + + + + + + + + + + + + + + + + + + + + + + + @@ -491,75 +517,75 @@ 1 1 1 - - - - - - - + + + + + + + 1 0 1 - + 1 0 Dock 0 Left 1 - + 1 - + 0 0 wxID_ANY - + 0 - - + + 0 -1,-1 1 m_messagePanel 1 - - + + protected 1 - + Resizable 1 - + WX_HTML_REPORT_PANEL; wx_html_report_panel.h 0 - - - + + + wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -577,17 +603,17 @@ 1 0 0 - + m_sdbSizer1 protected - - - - - + + + + + OnUpdateClick - - + + diff --git a/pcbnew/dialogs/dialog_update_pcb_base.h b/pcbnew/dialogs/dialog_update_pcb_base.h index d549c3ac81..12930d10e7 100644 --- a/pcbnew/dialogs/dialog_update_pcb_base.h +++ b/pcbnew/dialogs/dialog_update_pcb_base.h @@ -21,6 +21,7 @@ class WX_HTML_REPORT_PANEL; #include #include #include +#include #include #include #include