52 { wxID_APPLY,
_(
"Restore All Layers" ) },
53 { wxID_CANCEL,
_(
"Cancel" ) } } );
80 EndModal( wxID_APPLY );
93 auto viaHasPotentiallyUnusedLayers =
96 if(
via->GetViaType() == VIATYPE::THROUGH )
102 if( startLayer < 0 || endLayer < 0 )
108 auto padHasPotentiallyUnusedLayers =
111 return pad->GetAttribute() == PAD_ATTRIB::PTH;
124 if( viaHasPotentiallyUnusedLayers(
via ) )
126 via->SetRemoveUnconnected( aRemoveLayers );
139 if( padHasPotentiallyUnusedLayers(
pad ) )
141 pad->SetRemoveUnconnected( aRemoveLayers );
153 if( padHasPotentiallyUnusedLayers(
pad ) )
155 pad->SetRemoveUnconnected( aRemoveLayers );
171 for(
PAD*
pad : footprint->Pads() )
173 if( padHasPotentiallyUnusedLayers(
pad ) )
175 pad->SetRemoveUnconnected( aRemoveLayers );
193 if( viaHasPotentiallyUnusedLayers(
via ) )
196 via->SetRemoveUnconnected( aRemoveLayers );
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
int GetCopperLayerCount() const
const FOOTPRINTS & Footprints() const
const TRACKS & Tracks() const
int LayerDepth(PCB_LAYER_ID aStartLayer, PCB_LAYER_ID aEndLayer) const
Represent a set of changes (additions, deletions or modifications) of a data model (e....
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
virtual void Push(const wxString &aMessage=wxT("A commit"), int aFlags=0)=0
Revert the commit by restoring the modified items state.
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...
Class DIALOG_UNUSED_PAD_LAYERS_BASE.
wxCheckBox * m_cbPreserveExternalLayers
wxCheckBox * m_cbSelectedOnly
void onApply(wxCommandEvent &event) override
void onOK(wxCommandEvent &event) override
const PCB_SELECTION & m_items
void updatePadsAndVias(bool aRemoveLayers)
Update layers of pads and vias aRemoveLayers = true to remove not connected layers false to set all l...
void syncImages(wxCommandEvent &aEvent) override
DIALOG_UNUSED_PAD_LAYERS(PCB_BASE_FRAME *aParent, const PCB_SELECTION &aItems, COMMIT &aCommit)
A base class for most all the KiCad significant classes used in schematics and boards.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
PCB_LAYER_ID
A quick note on layer IDs:
@ PCB_VIA_T
class PCB_VIA, a via (like a track segment on a copper layer)
@ PCB_FOOTPRINT_T
class FOOTPRINT, a footprint
@ PCB_PAD_T
class PAD, a pad in a footprint