41 m_parentFrame( aParentFrame ),
51 wxArrayString netclassNames;
54 netclassNames.push_back( settings->GetDefaultNetclass()->GetName() );
56 for(
const auto& [
name, netclass] : settings->GetNetclasses() )
57 netclassNames.push_back(
name );
158 if( !aItem->IsSelected() )
160 EDA_GROUP* group = aItem->GetParentGroup();
162 while( group && !group->AsEdaItem()->IsSelected() )
163 group = group->AsEdaItem()->GetParentGroup();
172 if( aItem->GetNetCode() != m_netFilter->GetSelectedNetcode() )
178 NETCLASS* netclass = aItem->GetEffectiveNetClass();
180 if( !netclass->ContainsNetclassWithName( m_netclassFilter->GetStringSelection() ) )
186 if( aItem->GetLayer() != m_layerFilter->GetLayerSelection() )
193 m_outputBook->SetSelection( 1 );
208 if( m_cbRefillZones->GetValue() )
210 m_reporter->Report(
_(
"Checking zones..." ) );
212 m_parentFrame->GetToolManager()->GetTool<
ZONE_FILLER_TOOL>()->CheckAllZones(
this );
220 m_reporter->Report(
_(
"Rebuilding connectivity..." ) );
222 m_parentFrame->Compile_Ratsnest(
false );
224 cleaner.CleanupBoard( aDryRun, &m_items, m_cleanShortCircuitOpt->GetValue(),
225 m_cleanViasOpt->GetValue(),
226 m_mergeSegmOpt->GetValue(),
227 m_deleteUnconnectedOpt->GetValue(),
228 m_deleteTracksInPadsOpt->GetValue(),
229 m_deleteDanglingViasOpt->GetValue(),
232 if( m_cbRefillZones->GetValue() == wxCHK_CHECKED && !aDryRun )
234 m_reporter->Report(
_(
"Refilling all zones..." ) );
236 m_parentFrame->GetToolManager()->GetTool<
ZONE_FILLER_TOOL>()->FillAllZones(
this );
242 m_changesTreeModel->Update( std::make_shared<VECTOR_CLEANUP_ITEMS_PROVIDER>( &m_items ),
245 else if( !commit.Empty() )
248 commit.Push(
_(
"Board Cleanup" ) );
249 m_parentFrame->GetCanvas()->Refresh(
true );
252 m_outputBook->SetSelection( 0 );
253 setupOKButtonLabel();
static TOOL_ACTION selectionClear
Clear the current selection.
A base class derived from BOARD_ITEM for items that can be connected and have a net,...
std::shared_ptr< NET_SETTINGS > m_NetSettings
const wxString & GetCurrentNetClassName() const
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
const NETINFO_LIST & GetNetInfo() const
const std::set< int > & GetHighLightNetCodes() const
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
BOARD_ITEM * ResolveItem(const KIID &aID, bool aAllowNullptrReturn=false) const
Class DIALOG_CLEANUP_TRACKS_AND_VIAS_BASE.
wxChoice * m_netclassFilter
PCB_LAYER_BOX_SELECTOR * m_layerFilter
wxCheckBox * m_layerFilterOpt
wxDataViewCtrl * m_changesDataView
wxCheckBox * m_netclassFilterOpt
NET_SELECTOR * m_netFilter
wxCheckBox * m_selectedItemsFilter
wxCheckBox * m_netFilterOpt
wxStdDialogButtonSizer * m_sdbSizer
RC_TREE_MODEL * m_changesTreeModel
void OnNetclassFilterSelect(wxCommandEvent &aEvent) override
void OnSelectItem(wxDataViewEvent &event) override
void OnCheckBox(wxCommandEvent &aEvent) override
WX_TEXT_CTRL_REPORTER * m_reporter
PCB_EDIT_FRAME * m_parentFrame
~DIALOG_CLEANUP_TRACKS_AND_VIAS()
void OnLeftDClickItem(wxMouseEvent &event) override
bool TransferDataFromWindow() override
void doCleanup(bool aDryRun)
bool TransferDataToWindow() override
void setupOKButtonLabel()
DIALOG_CLEANUP_TRACKS_AND_VIAS(PCB_EDIT_FRAME *parent)
void OnNetFilterSelect(wxCommandEvent &aEvent)
void OnLayerFilterSelect(wxCommandEvent &aEvent) override
bool Show(bool show) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
int SetLayerSelection(int layer)
bool SetLayersHotkeys(bool value)
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
void SetNetInfo(const NETINFO_LIST *aNetInfoList)
void SetSelectedNetcode(int aNetcode)
void FocusOnItem(EDA_ITEM *aItem) override
Focus on a particular canvas item.
virtual PCB_LAYER_ID GetActiveLayer() const
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
The main frame for Pcbnew.
void SetBoardFrame(PCB_BASE_FRAME *aFrame)
void SetNotAllowedLayerSet(const LSET &aMask)
void Update(std::shared_ptr< RC_ITEMS_PROVIDER > aProvider, int aSeverities)
static KIID ToUUID(wxDataViewItem aItem)
void SetFilter(const std::function< bool(BOARD_CONNECTED_ITEM *aItem)> &aFilter)
A wrapper for reporting to a wxTextCtrl object.
Class to handle a set of BOARD_ITEMs.