diff --git a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp index 3c5233625c..3ad56614d7 100644 --- a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp +++ b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias.cpp @@ -39,6 +39,7 @@ DIALOG_CLEANUP_TRACKS_AND_VIAS::DIALOG_CLEANUP_TRACKS_AND_VIAS( PCB_EDIT_FRAME* auto cfg = m_parentFrame->GetPcbNewSettings(); m_reporter = new WX_TEXT_CTRL_REPORTER( m_tcReport ); + m_cbRefillZones->SetValue( cfg->m_Cleanup.cleanup_refill_zones ); m_cleanViasOpt->SetValue( cfg->m_Cleanup.cleanup_vias ); m_mergeSegmOpt->SetValue( cfg->m_Cleanup.merge_segments ); m_deleteUnconnectedOpt->SetValue( cfg->m_Cleanup.cleanup_unconnected ); @@ -72,6 +73,7 @@ DIALOG_CLEANUP_TRACKS_AND_VIAS::~DIALOG_CLEANUP_TRACKS_AND_VIAS() if( cfg ) { + cfg->m_Cleanup.cleanup_refill_zones = m_cbRefillZones->GetValue(); cfg->m_Cleanup.cleanup_vias = m_cleanViasOpt->GetValue(); cfg->m_Cleanup.merge_segments = m_mergeSegmOpt->GetValue(); cfg->m_Cleanup.cleanup_unconnected = m_deleteUnconnectedOpt->GetValue(); @@ -139,10 +141,14 @@ void DIALOG_CLEANUP_TRACKS_AND_VIAS::doCleanup( bool aDryRun ) if( m_firstRun ) { - m_reporter->Report( _( "Checking zones..." ) ); - wxSafeYield(); // Timeslice to update UI - m_parentFrame->GetToolManager()->GetTool()->CheckAllZones( this ); - wxSafeYield(); // Timeslice to close zone progress reporter + if( m_cbRefillZones->GetValue() ) + { + m_reporter->Report( _( "Checking zones..." ) ); + wxSafeYield(); // Timeslice to update UI + m_parentFrame->GetToolManager()->GetTool()->CheckAllZones( this ); + wxSafeYield(); // Timeslice to close zone progress reporter + } + m_firstRun = false; } diff --git a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.cpp b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.cpp index 75a2ab9adb..5913b788f7 100644 --- a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.cpp +++ b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -22,6 +22,9 @@ DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE::DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE( wxWind wxBoxSizer* bSizerLeft; bSizerLeft = new wxBoxSizer( wxVERTICAL ); + m_cbRefillZones = new wxCheckBox( this, wxID_ANY, _("Refill zones before run cleanup"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizerLeft->Add( m_cbRefillZones, 0, wxALL, 5 ); + m_cleanShortCircuitOpt = new wxCheckBox( this, wxID_ANY, _("Delete &tracks connecting different nets"), wxDefaultPosition, wxDefaultSize, 0 ); m_cleanShortCircuitOpt->SetToolTip( _("remove track segments connecting nodes belonging to different nets (short circuit)") ); diff --git a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.fbp b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.fbp index 52c8fc5329..48b4e8840b 100644 --- a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.fbp +++ b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.fbp @@ -1,34 +1,36 @@ - + - C++ - 1 - source_name - 0 - 0 + + 1 + connect + none + + + 0 + 0 res UTF-8 - connect dialog_cleanup_tracks_and_vias_base 1000 - none - - 1 + 1 + UI dialog_cleanup_tracks_and_vias - . - + 0 + source_name + 1 + 0 + source_name + + + 1 1 - 1 - 1 - 1 - UI - 0 - 0 0 + 0 0 wxAUI_MGR_DEFAULT @@ -81,6 +83,71 @@ bSizerLeft wxVERTICAL none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Refill zones before run cleanup + + 0 + + + 0 + + 1 + m_cbRefillZones + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + 5 wxALL @@ -90,10 +157,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -156,10 +223,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -222,10 +289,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -288,10 +355,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -354,10 +421,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -420,10 +487,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -497,10 +564,10 @@ 1 1 1 - + 0 - - + 0 + 0 @@ -524,7 +591,7 @@ 0 - + 0 0 @@ -575,10 +642,10 @@ 1 1 1 - + 0 - - + 0 + 0 diff --git a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.h b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.h index 6043eae1f4..7ca44f0817 100644 --- a/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.h +++ b/pcbnew/dialogs/dialog_cleanup_tracks_and_vias_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -26,7 +26,6 @@ /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE /////////////////////////////////////////////////////////////////////////////// @@ -35,6 +34,7 @@ class DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE : public DIALOG_SHIM private: protected: + wxCheckBox* m_cbRefillZones; wxCheckBox* m_cleanShortCircuitOpt; wxCheckBox* m_cleanViasOpt; wxCheckBox* m_deleteDanglingViasOpt; diff --git a/pcbnew/pcbnew_settings.cpp b/pcbnew/pcbnew_settings.cpp index 89075ae255..edc2544939 100644 --- a/pcbnew/pcbnew_settings.cpp +++ b/pcbnew/pcbnew_settings.cpp @@ -285,6 +285,9 @@ PCBNEW_SETTINGS::PCBNEW_SETTINGS() m_params.emplace_back( new PARAM( "pcb_display.show_page_borders", &m_ShowPageLimits, true ) ); + m_params.emplace_back( new PARAM( "cleanup.cleanup_refill_zones", + &m_Cleanup.cleanup_refill_zones, true ) ); + m_params.emplace_back( new PARAM( "cleanup.cleanup_vias", &m_Cleanup.cleanup_vias, true ) ); diff --git a/pcbnew/pcbnew_settings.h b/pcbnew/pcbnew_settings.h index ff5b858877..040be65fef 100644 --- a/pcbnew/pcbnew_settings.h +++ b/pcbnew/pcbnew_settings.h @@ -153,6 +153,7 @@ public: struct DIALOG_CLEANUP { + bool cleanup_refill_zones; bool cleanup_vias; bool delete_dangling_vias; bool cleanup_tracks_in_pad;