Make Edit Track & Via Sizes "specified sizes" dropdowns clearer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17216
This commit is contained in:
parent
25e181db5c
commit
1844bf1708
|
@ -130,9 +130,9 @@ DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS( PCB_EDIT
|
|||
|
||||
buildFilterLists();
|
||||
|
||||
m_parent->UpdateTrackWidthSelectBox( m_trackWidthCtrl, false );
|
||||
m_parent->UpdateTrackWidthSelectBox( m_trackWidthCtrl, false, false );
|
||||
m_trackWidthCtrl->Append( INDETERMINATE_ACTION );
|
||||
m_parent->UpdateViaSizeSelectBox( m_viaSizesCtrl, false );
|
||||
m_parent->UpdateViaSizeSelectBox( m_viaSizesCtrl, false, false );
|
||||
m_viaSizesCtrl->Append( INDETERMINATE_ACTION );
|
||||
|
||||
m_layerCtrl->SetBoardFrame( m_parent );
|
||||
|
@ -184,9 +184,9 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::onUnitsChanged( wxCommandEvent& aEvent
|
|||
int trackSel = m_trackWidthCtrl->GetSelection();
|
||||
int viaSel = m_viaSizesCtrl->GetSelection();
|
||||
|
||||
m_parent->UpdateTrackWidthSelectBox( m_trackWidthCtrl, false );
|
||||
m_parent->UpdateTrackWidthSelectBox( m_trackWidthCtrl, false, false );
|
||||
m_trackWidthCtrl->Append( INDETERMINATE_ACTION );
|
||||
m_parent->UpdateViaSizeSelectBox( m_viaSizesCtrl, false );
|
||||
m_parent->UpdateViaSizeSelectBox( m_viaSizesCtrl, false, false );
|
||||
m_viaSizesCtrl->Append( INDETERMINATE_ACTION );
|
||||
|
||||
m_trackWidthCtrl->SetSelection( trackSel );
|
||||
|
@ -317,7 +317,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem( PICKED_ITEMS_LIST* aUndoLi
|
|||
int trackWidthIndex = m_trackWidthCtrl->GetSelection();
|
||||
|
||||
if( trackWidthIndex >= 0 )
|
||||
brdSettings.SetTrackWidthIndex( static_cast<unsigned>( trackWidthIndex ) );
|
||||
brdSettings.SetTrackWidthIndex( static_cast<unsigned>( trackWidthIndex + 1 ) );
|
||||
|
||||
m_parent->SetTrackSegmentWidth( aItem, aUndoList, false );
|
||||
|
||||
|
@ -329,7 +329,7 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::processItem( PICKED_ITEMS_LIST* aUndoLi
|
|||
int viaSizeIndex = m_viaSizesCtrl->GetSelection();
|
||||
|
||||
if( viaSizeIndex >= 0 )
|
||||
brdSettings.SetViaSizeIndex( static_cast<unsigned>( viaSizeIndex ) );
|
||||
brdSettings.SetViaSizeIndex( static_cast<unsigned>( viaSizeIndex + 1 ) );
|
||||
|
||||
m_parent->SetTrackSegmentWidth( aItem, aUndoList, false );
|
||||
|
||||
|
|
|
@ -169,8 +169,9 @@ public:
|
|||
|
||||
void RunEeschema();
|
||||
|
||||
void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aEdit = true );
|
||||
void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aEdit = true );
|
||||
void UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aShowNetclass,
|
||||
bool aShowEdit );
|
||||
void UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aShowNetclass, bool aShowEdit );
|
||||
|
||||
/**
|
||||
* Return the angle used for rotate operations.
|
||||
|
|
|
@ -526,7 +526,7 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar()
|
|||
m_SelTrackWidthBox = new wxChoice( m_auxiliaryToolBar, ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
|
||||
wxDefaultPosition, wxDefaultSize, 0, nullptr );
|
||||
|
||||
UpdateTrackWidthSelectBox( m_SelTrackWidthBox );
|
||||
UpdateTrackWidthSelectBox( m_SelTrackWidthBox, true, true );
|
||||
m_auxiliaryToolBar->AddControl( m_SelTrackWidthBox );
|
||||
m_SelTrackWidthBox->SetToolTip( _( "Select the default width for new tracks. Note that this "
|
||||
"width can be overridden by the board minimum width, or by "
|
||||
|
@ -547,7 +547,7 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar()
|
|||
m_SelViaSizeBox = new wxChoice( m_auxiliaryToolBar, ID_AUX_TOOLBAR_PCB_VIA_SIZE,
|
||||
wxDefaultPosition, wxDefaultSize, 0, nullptr );
|
||||
|
||||
UpdateViaSizeSelectBox( m_SelViaSizeBox );
|
||||
UpdateViaSizeSelectBox( m_SelViaSizeBox, true, true );
|
||||
m_auxiliaryToolBar->AddControl( m_SelViaSizeBox );
|
||||
|
||||
m_auxiliaryToolBar->AddScaledSeparator( this );
|
||||
|
@ -642,7 +642,8 @@ static wxString ComboBoxUnits( EDA_UNITS aUnits, double aValue, bool aIncludeLab
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aEdit )
|
||||
void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aShowNetclass,
|
||||
bool aShowEdit )
|
||||
{
|
||||
if( aTrackWidthSelectBox == nullptr )
|
||||
return;
|
||||
|
@ -656,7 +657,8 @@ void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox,
|
|||
|
||||
aTrackWidthSelectBox->Clear();
|
||||
|
||||
aTrackWidthSelectBox->Append( _( "Track: use netclass width" ) );
|
||||
if( aShowNetclass )
|
||||
aTrackWidthSelectBox->Append( _( "Track: use netclass width" ) );
|
||||
|
||||
for( unsigned ii = 1; ii < GetDesignSettings().m_TrackWidthList.size(); ii++ )
|
||||
{
|
||||
|
@ -668,7 +670,7 @@ void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox,
|
|||
aTrackWidthSelectBox->Append( msg );
|
||||
}
|
||||
|
||||
if( aEdit )
|
||||
if( aShowEdit )
|
||||
{
|
||||
aTrackWidthSelectBox->Append( wxT( "---" ) );
|
||||
aTrackWidthSelectBox->Append( _( "Edit Pre-defined Sizes..." ) );
|
||||
|
@ -681,7 +683,8 @@ void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox,
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aEdit )
|
||||
void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aShowNetclass,
|
||||
bool aShowEdit )
|
||||
{
|
||||
if( aViaSizeSelectBox == nullptr )
|
||||
return;
|
||||
|
@ -708,7 +711,8 @@ void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool a
|
|||
secondaryUnit = EDA_UNITS::MILS;
|
||||
}
|
||||
|
||||
aViaSizeSelectBox->Append( _( "Via: use netclass sizes" ) );
|
||||
if( aShowNetclass )
|
||||
aViaSizeSelectBox->Append( _( "Via: use netclass sizes" ) );
|
||||
|
||||
for( unsigned ii = 1; ii < GetDesignSettings().m_ViasDimensionsList.size(); ii++ )
|
||||
{
|
||||
|
@ -736,7 +740,7 @@ void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool a
|
|||
aViaSizeSelectBox->Append( msg );
|
||||
}
|
||||
|
||||
if( aEdit )
|
||||
if( aShowEdit )
|
||||
{
|
||||
aViaSizeSelectBox->Append( wxT( "---" ) );
|
||||
aViaSizeSelectBox->Append( _( "Edit Pre-defined Sizes..." ) );
|
||||
|
|
Loading…
Reference in New Issue