diff --git a/include/board_design_settings.h b/include/board_design_settings.h index b46a9c584c..ab6a98c062 100644 --- a/include/board_design_settings.h +++ b/include/board_design_settings.h @@ -235,7 +235,7 @@ public: BOARD_STACKUP& GetStackupDescriptor() { return m_stackup; } const BOARD_STACKUP& GetStackupDescriptor() const { return m_stackup; } - TEARDROP_PARAMETERS_LIST* GetTeardropParamsList() + TEARDROP_PARAMETERS_LIST* GetTeadropParamsList() { return &m_TeardropParamsList; } diff --git a/pcbnew/board_design_settings.cpp b/pcbnew/board_design_settings.cpp index 9f60501627..b7d333bf97 100644 --- a/pcbnew/board_design_settings.cpp +++ b/pcbnew/board_design_settings.cpp @@ -467,13 +467,13 @@ BOARD_DESIGN_SETTINGS::BOARD_DESIGN_SETTINGS( JSON_SETTINGS* aParent, const std: nlohmann::json js = nlohmann::json::array(); nlohmann::json entry = {}; - entry["td_onviapad"] = m_TeardropParamsList.m_TargetViasPads; - entry["td_onpadsmd"] = m_TeardropParamsList.m_TargetPadsWithNoHole; - entry["td_ontrackend"] = m_TeardropParamsList.m_TargetTrack2Track; - entry["td_onroundshapesonly"] = m_TeardropParamsList.m_UseRoundShapesOnly; + entry["td_onviapad"] = m_TeardropParamsList.m_TargetViasPads; + entry["td_onpadsmd"] = m_TeardropParamsList.m_TargetPadsWithNoHole; + entry["td_ontrackend"] = m_TeardropParamsList.m_TargetTrack2Track; + entry["td_onroundshapesonly"] = m_TeardropParamsList.m_UseRoundShapesOnly; entry["td_allow_use_two_tracks"] = m_TeardropParamsList.m_AllowUseTwoTracks; - entry["td_curve_segcount"] = m_TeardropParamsList.m_CurveSegCount; - entry["td_on_pad_in_zone"] = m_TeardropParamsList.m_TdOnPadsInZones; + entry["td_curve_segcount"] = m_TeardropParamsList.m_CurveSegCount; + entry["td_on_pad_in_zone"] = m_TeardropParamsList.m_TdOnPadsInZones; js.push_back( entry ); diff --git a/pcbnew/dialogs/dialog_drc.cpp b/pcbnew/dialogs/dialog_drc.cpp index 87404fd50d..bf75e6bbc6 100644 --- a/pcbnew/dialogs/dialog_drc.cpp +++ b/pcbnew/dialogs/dialog_drc.cpp @@ -131,7 +131,6 @@ DIALOG_DRC::DIALOG_DRC( PCB_EDIT_FRAME* aEditorFrame, wxWindow* aParent ) : m_ignoredTitleTemplate = m_Notebook->GetPageText( 3 ); m_cbRefillZones->SetValue( cfg->m_DrcDialog.refill_zones ); - m_cbUpdateTeardrops->SetValue( cfg->m_DrcDialog.update_teardrops ); m_cbReportAllTrackErrors->SetValue( cfg->m_DrcDialog.test_all_track_errors ); if( !Kiface().IsSingle() ) @@ -162,7 +161,6 @@ DIALOG_DRC::~DIALOG_DRC() PCBNEW_SETTINGS* settings = m_frame->GetPcbNewSettings(); settings->m_DrcDialog.refill_zones = m_cbRefillZones->GetValue(); - settings->m_DrcDialog.update_teardrops = m_cbUpdateTeardrops->GetValue(); settings->m_DrcDialog.test_all_track_errors = m_cbReportAllTrackErrors->GetValue(); if( !Kiface().IsSingle() ) @@ -239,7 +237,6 @@ void DIALOG_DRC::OnRunDRCClick( wxCommandEvent& aEvent ) DRC_TOOL* drcTool = toolMgr->GetTool(); ZONE_FILLER_TOOL* zoneFillerTool = toolMgr->GetTool(); bool refillZones = m_cbRefillZones->GetValue(); - bool updateTeardrops = m_cbUpdateTeardrops->GetValue(); bool reportAllTrackErrors = m_cbReportAllTrackErrors->GetValue(); bool testFootprints = m_cbTestFootprints->GetValue(); @@ -305,7 +302,7 @@ void DIALOG_DRC::OnRunDRCClick( wxCommandEvent& aEvent ) { wxBusyCursor dummy; - drcTool->RunTests( this, refillZones, updateTeardrops, reportAllTrackErrors, testFootprints ); + drcTool->RunTests( this, refillZones, reportAllTrackErrors, testFootprints ); } if( m_cancelled ) diff --git a/pcbnew/dialogs/dialog_drc_base.cpp b/pcbnew/dialogs/dialog_drc_base.cpp index b2c50c4d51..bd484a297d 100644 --- a/pcbnew/dialogs/dialog_drc_base.cpp +++ b/pcbnew/dialogs/dialog_drc_base.cpp @@ -27,8 +27,10 @@ DIALOG_DRC_BASE::DIALOG_DRC_BASE( wxWindow* parent, wxWindowID id, const wxStrin m_cbRefillZones = new wxCheckBox( this, wxID_ANY, _("Refill all zones before performing DRC"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer12->Add( m_cbRefillZones, 0, wxALL, 5 ); - m_cbUpdateTeardrops = new wxCheckBox( this, wxID_ANY, _("Update teardrops before performing DRC"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer12->Add( m_cbUpdateTeardrops, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_cbReportAllTrackErrors = new wxCheckBox( this, wxID_ANY, _("Report all errors for each track"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cbReportAllTrackErrors->SetToolTip( _("If selected, all DRC violations for tracks will be reported. This can be slow for complicated designs.\n\nIf unselected, only the first DRC violation will be reported for each track connection.") ); + + bSizer12->Add( m_cbReportAllTrackErrors, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizerOptions->Add( bSizer12, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); @@ -36,11 +38,6 @@ DIALOG_DRC_BASE::DIALOG_DRC_BASE( wxWindow* parent, wxWindowID id, const wxStrin wxBoxSizer* bSizerOptSettings; bSizerOptSettings = new wxBoxSizer( wxVERTICAL ); - m_cbReportAllTrackErrors = new wxCheckBox( this, wxID_ANY, _("Report all errors for each track"), wxDefaultPosition, wxDefaultSize, 0 ); - m_cbReportAllTrackErrors->SetToolTip( _("If selected, all DRC violations for tracks will be reported. This can be slow for complicated designs.\n\nIf unselected, only the first DRC violation will be reported for each track connection.") ); - - bSizerOptSettings->Add( m_cbReportAllTrackErrors, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - m_cbTestFootprints = new wxCheckBox( this, wxID_ANY, _("Test for parity between PCB and schematic"), wxDefaultPosition, wxDefaultSize, 0 ); bSizerOptSettings->Add( m_cbTestFootprints, 0, wxALL, 5 ); @@ -48,7 +45,7 @@ DIALOG_DRC_BASE::DIALOG_DRC_BASE( wxWindow* parent, wxWindowID id, const wxStrin bSizerOptions->Add( bSizerOptSettings, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - m_MainSizer->Add( bSizerOptions, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 ); + m_MainSizer->Add( bSizerOptions, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 3 ); m_runningResultsBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); running = new wxPanel( m_runningResultsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); @@ -151,7 +148,7 @@ DIALOG_DRC_BASE::DIALOG_DRC_BASE( wxWindow* parent, wxWindowID id, const wxStrin bSizer15->Fit( m_panelIgnored ); m_Notebook->AddPage( m_panelIgnored, _("Ignored Tests (%s)"), false ); - bSizer13->Add( m_Notebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bSizer13->Add( m_Notebook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); results->SetSizer( bSizer13 ); @@ -202,7 +199,7 @@ DIALOG_DRC_BASE::DIALOG_DRC_BASE( wxWindow* parent, wxWindowID id, const wxStrin bSeveritySizer->Add( m_saveReport, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - bSizer9->Add( bSeveritySizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + bSizer9->Add( bSeveritySizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_MainSizer->Add( bSizer9, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); diff --git a/pcbnew/dialogs/dialog_drc_base.fbp b/pcbnew/dialogs/dialog_drc_base.fbp index f1ca67346e..eea18055f0 100644 --- a/pcbnew/dialogs/dialog_drc_base.fbp +++ b/pcbnew/dialogs/dialog_drc_base.fbp @@ -64,7 +64,7 @@ wxVERTICAL none - 5 + 3 wxEXPAND|wxTOP|wxBOTTOM|wxLEFT 0 @@ -145,84 +145,9 @@ - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Update teardrops before performing DRC - - 0 - - - 0 - - 1 - m_cbUpdateTeardrops - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 1 - - - bSizerOptSettings - wxVERTICAL - none 5 - wxTOP|wxRIGHT|wxLEFT + wxBOTTOM|wxRIGHT|wxLEFT 0 1 @@ -284,6 +209,17 @@ + + + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 1 + + + bSizerOptSettings + wxVERTICAL + none 5 wxALL @@ -785,7 +721,7 @@ wxVERTICAL none - 5 + 10 wxEXPAND|wxTOP|wxRIGHT|wxLEFT 1 @@ -1338,7 +1274,7 @@ none 5 - wxEXPAND|wxRIGHT|wxLEFT + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 diff --git a/pcbnew/dialogs/dialog_drc_base.h b/pcbnew/dialogs/dialog_drc_base.h index eb2ed47156..f5e56a177c 100644 --- a/pcbnew/dialogs/dialog_drc_base.h +++ b/pcbnew/dialogs/dialog_drc_base.h @@ -50,7 +50,6 @@ class DIALOG_DRC_BASE : public DIALOG_SHIM protected: wxCheckBox* m_cbRefillZones; - wxCheckBox* m_cbUpdateTeardrops; wxCheckBox* m_cbReportAllTrackErrors; wxCheckBox* m_cbTestFootprints; wxSimplebook* m_runningResultsBook; diff --git a/pcbnew/pcbnew_settings.cpp b/pcbnew/pcbnew_settings.cpp index c770e67f6f..4ce39581a3 100644 --- a/pcbnew/pcbnew_settings.cpp +++ b/pcbnew/pcbnew_settings.cpp @@ -277,9 +277,6 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS() m_params.emplace_back( new PARAM( "drc_dialog.refill_zones", &m_DrcDialog.refill_zones, true ) ); - m_params.emplace_back( new PARAM( "drc_dialog.update_teardrops", - &m_DrcDialog.update_teardrops, true ) ); - m_params.emplace_back( new PARAM( "drc_dialog.test_all_track_errors", &m_DrcDialog.test_all_track_errors, false ) ); diff --git a/pcbnew/pcbnew_settings.h b/pcbnew/pcbnew_settings.h index 70fb57c5d1..f48528ebff 100644 --- a/pcbnew/pcbnew_settings.h +++ b/pcbnew/pcbnew_settings.h @@ -158,7 +158,6 @@ public: struct DIALOG_DRC { bool refill_zones; - bool update_teardrops; bool test_all_track_errors; bool test_footprints; int severities; diff --git a/pcbnew/teardrop/dialog_teardrop.cpp b/pcbnew/teardrop/dialog_teardrop.cpp index 333bb85df7..e8422c34f1 100644 --- a/pcbnew/teardrop/dialog_teardrop.cpp +++ b/pcbnew/teardrop/dialog_teardrop.cpp @@ -59,7 +59,7 @@ public: m_bitmapTdTrackInfo->SetBitmap( KiBitmap( BITMAPS::teardrop_track_sizes ) ); m_brdSettings = &m_frame->GetBoard()->GetBoard()->GetDesignSettings(); - TEARDROP_PARAMETERS_LIST* prmsList = m_brdSettings->GetTeardropParamsList(); + TEARDROP_PARAMETERS_LIST* prmsList = m_brdSettings->GetTeadropParamsList(); m_cbPadVia->SetValue( prmsList->m_TargetViasPads ); m_cbSmdSimilarPads->SetValue( prmsList->m_TargetPadsWithNoHole ); @@ -109,7 +109,7 @@ public: void TransferToParamList() { int shape_seg_count = GetCurvePointCount(); - TEARDROP_PARAMETERS_LIST* prmsList = m_brdSettings->GetTeardropParamsList(); + TEARDROP_PARAMETERS_LIST* prmsList = m_brdSettings->GetTeadropParamsList(); prmsList->m_TargetViasPads = m_cbPadVia->GetValue(); prmsList->m_TargetPadsWithNoHole = m_cbSmdSimilarPads->GetValue(); diff --git a/pcbnew/teardrop/teardrop.cpp b/pcbnew/teardrop/teardrop.cpp index a267317afd..1f0e1ae78f 100644 --- a/pcbnew/teardrop/teardrop.cpp +++ b/pcbnew/teardrop/teardrop.cpp @@ -46,7 +46,7 @@ TEARDROP_MANAGER::TEARDROP_MANAGER( BOARD* aBoard, PCB_EDIT_FRAME* aFrame ) { m_board = aBoard; - m_prmsList = m_board->GetDesignSettings().GetTeardropParamsList(); + m_prmsList = m_board->GetDesignSettings().GetTeadropParamsList(); m_tolerance = 0; } diff --git a/pcbnew/tools/drc_tool.cpp b/pcbnew/tools/drc_tool.cpp index eb14cd78ac..d927bab029 100644 --- a/pcbnew/tools/drc_tool.cpp +++ b/pcbnew/tools/drc_tool.cpp @@ -36,7 +36,6 @@ #include #include #include -#include DRC_TOOL::DRC_TOOL() : PCB_TOOL_BASE( "pcbnew.DRCTool" ), @@ -130,7 +129,7 @@ void DRC_TOOL::DestroyDRCDialog() void DRC_TOOL::RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones, - bool aUpdateTeardrops, bool aReportAllTrackErrors, bool aTestFootprints ) + bool aReportAllTrackErrors, bool aTestFootprints ) { // One at a time, please. // Note that the main GUI entry points to get here are blocked, so this is really an @@ -153,17 +152,6 @@ void DRC_TOOL::RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones zoneFiller->FillAllZones( m_drcDialog, aProgressReporter ); } - if( aUpdateTeardrops ) - { - aProgressReporter->AdvancePhase( _( "Updating teardrops..." ) ); - - BOARD* board( m_editFrame->GetBoard() ); - BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings(); - TEARDROP_MANAGER teardropManager( board, m_editFrame ); - - teardropManager.SetTeardrops( &commit, bds.GetTeardropParamsList()->m_AllowUseTwoTracks ); - } - m_drcEngine->SetDrawingSheet( m_editFrame->GetCanvas()->GetDrawingSheet() ); if( aTestFootprints && !Kiface().IsSingle() ) diff --git a/pcbnew/tools/drc_tool.h b/pcbnew/tools/drc_tool.h index d589c10eb3..218fab7624 100644 --- a/pcbnew/tools/drc_tool.h +++ b/pcbnew/tools/drc_tool.h @@ -80,7 +80,7 @@ public: /** * Run the DRC tests. */ - void RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones, bool aUpdateTeardrops, + void RunTests( PROGRESS_REPORTER* aProgressReporter, bool aRefillZones, bool aReportAllTrackErrors, bool aTestFootprints ); int PrevMarker( const TOOL_EVENT& aEvent );