25using namespace std::placeholders;
56 GetSizer()->SetSizeHints(
this );
68 if( dlg.ShowModal() == wxID_OK )
117 bool gen_rastnest =
false;
118 bool delete_all =
m_delAll->GetValue();
120 if( !
IsOK( GetParent(), delete_all ?
_(
"Are you sure you want to delete the entire board?" )
121 :
_(
"Are you sure you want to delete the selected items?" ) ) )
137 layers_filter = all_layers;
146 auto processConnectedItem =
161 processConnectedItem( zone, all_layers );
163 processConnectedItem( zone, layers_filter );
170 if( delete_all || delete_shapes || delete_texts )
173 LSET drawing_layers_filter;
181 drawing_layers_filter &= layers_filter;
187 processItem( item, all_layers );
189 else if( delete_shapes )
194 processItem( item, drawing_layers_filter );
199 processItem( item, drawing_layers_filter );
202 else if( delete_texts )
205 processItem( item, layers_filter );
216 processConnectedItem( footprint, all_layers );
218 else if( footprint->IsLocked() )
221 processConnectedItem( footprint, layers_filter );
226 processConnectedItem( footprint, layers_filter );
237 processConnectedItem( track, all_layers );
242 processConnectedItem( track, layers_filter );
244 else if( track->IsLocked() )
247 processConnectedItem( track, layers_filter );
252 processConnectedItem( track, layers_filter );
257 commit.
Push( wxT(
"Global delete" ) );
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
virtual LSET GetLayerSet() const
Return a std::bitset of all layers on which the item physically resides.
virtual bool IsLocked() const
Information pertinent to a Pcbnew printed circuit board.
FOOTPRINTS & Footprints()
const wxString GetLayerName(PCB_LAYER_ID aLayer) const
Return the name of a aLayer.
void DeleteMARKERs()
Delete all MARKERS from the board.
COMMIT & Remove(EDA_ITEM *aItem)
Notify observers that aItem has been removed.
Class DIALOG_GLOBAL_DELETION_BASE.
wxCheckBox * m_trackFilterUnlocked
wxCheckBox * m_trackFilterLocked
wxCheckBox * m_trackFilterVias
wxCheckBox * m_footprintFilterLocked
wxCheckBox * m_delBoardEdges
wxRadioBox * m_rbLayersOption
wxCheckBox * m_footprintFilterUnlocked
wxCheckBox * m_drawingFilterLocked
wxCheckBox * m_delDrawings
wxCheckBox * m_delFootprints
wxCheckBox * m_drawingFilterUnlocked
wxCheckBox * m_delMarkers
wxTextCtrl * m_textCtrlCurrLayer
PCB_EDIT_FRAME * m_Parent
DIALOG_GLOBAL_DELETION(PCB_EDIT_FRAME *parent)
void onCheckDeleteDrawings(wxCommandEvent &event) override
void onCheckDeleteFootprints(wxCommandEvent &event) override
void SetCurrentLayer(int aLayer)
void onCheckDeleteBoardOutlines(wxCommandEvent &event) override
void onCheckDeleteTracks(wxCommandEvent &event) override
void SetupStandardButtons(std::map< int, wxString > aLabels={})
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
KICAD_T Type() const
Returns the type of object.
LSET is a set of PCB_LAYER_IDs.
static LSET AllNonCuMask()
Return a mask holding all layer minus CU layers.
static TOOL_ACTION selectionClear
Clear the current selection.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void Compile_Ratsnest(bool aDisplayStatus)
Create the entire board ratsnest.
The main frame for Pcbnew.
Handle a list of polygons defining a copper zone.
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
This file is part of the common library.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Class that computes missing connections on a PCB.
@ PCB_SHAPE_T
class PCB_SHAPE, a segment not on copper layers
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_TEXTBOX_T
class PCB_TEXTBOX, wrapped text on a layer
@ PCB_TEXT_T
class PCB_TEXT, text on a layer