31 #include <wx/choice.h> 35 bool aUseNetclassValue )
39 int initial_drill = -1;
42 initial_width = aTrackItem->
GetWidth();
44 if( aUseNetclassValue )
51 const PCB_VIA *
via = static_cast<const PCB_VIA*>( aTrackItem );
54 initial_drill =
via->GetDrillValue();
71 if(
via->GetDrill() <= 0 )
77 if( initial_width != new_width || initial_drill != new_drill )
79 if( aItemsListPicker )
81 aTrackItem->
SetWidth( initial_width );
84 aItemsListPicker->
PushItem( picker );
90 PCB_VIA *
via = static_cast<PCB_VIA*>( aTrackItem );
93 via->SetDrill( new_drill );
95 via->SetDrillDefault();
105 int id =
event.GetId();
void SetTrackWidthIndex(unsigned aIndex)
Set the current track width list index to aIndex.
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Returns the BOARD_DESIGN_SETTINGS for the open project.
int GetCurrentViaDrill() const
int GetCurrentTrackWidth() const
virtual EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
virtual NETCLASS * GetNetClass() const
Return the NETCLASS for this item.
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
wxChoice * m_SelViaSizeBox
static TOOL_ACTION trackViaSizeChanged
void PushItem(const ITEM_PICKER &aItem)
Push aItem to the top of the list.
wxChoice * m_SelTrackWidthBox
void SetLink(EDA_ITEM *aItem)
bool m_UseConnectedTrackWidth
void SetTrackSegmentWidth(PCB_TRACK *aTrackItem, PICKED_ITEMS_LIST *aItemsListPicker, bool aUseNetclassValue)
Modify one track segment width or one via diameter (using DRC control).
void SetViaSizeIndex(unsigned aIndex)
Set the current via size list index to aIndex.
int GetTrackWidth() const
void Tracks_and_Vias_Size_Event(wxCommandEvent &event)
void ShowBoardSetupDialog(const wxString &aInitialPage=wxEmptyString)
virtual void SetFocus() override
A holder to handle information on schematic or board items.
bool m_TempOverrideTrackWidth
void SetWidth(int aWidth)
int GetCurrentViaSize() const
int GetViaDiameter() const
class PCB_VIA, a via (like a track segment on a copper layer)
ID_POPUP_PCB_SELECT_WIDTH8
void UseCustomTrackViaSize(bool aEnabled)
Enables/disables custom track/via size settings.
KICAD_T Type() const
Returns the type of object.