Track & via properties dialog start with focus on track width/via diameter text input.
This commit is contained in:
parent
d2ebf688f9
commit
600bb2b640
|
@ -126,6 +126,23 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
}
|
||||
}
|
||||
|
||||
assert( m_tracks || m_vias );
|
||||
|
||||
if( m_vias )
|
||||
{
|
||||
setCommonVal( viaX, m_ViaXCtrl, m_viaX );
|
||||
setCommonVal( viaY, m_ViaYCtrl, m_viaY );
|
||||
setCommonVal( viaDiameter, m_ViaDiameterCtrl, m_viaDiameter );
|
||||
setCommonVal( viaDrill, m_ViaDrillCtrl, m_viaDrill );
|
||||
m_ViaDiameterCtrl->SetFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
// you cannot access sizers directly if the code was generated by wxFormBuilder
|
||||
wxSizer* s = m_viaStaticLine->GetContainingSizer();
|
||||
m_mainSizerAccessor->GetContainingSizer()->Hide( s, true );
|
||||
}
|
||||
|
||||
if( m_tracks )
|
||||
{
|
||||
setCommonVal( trackStartX, m_TrackStartXCtrl, m_trackStartX );
|
||||
|
@ -141,6 +158,8 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
|
||||
if( trackLayer )
|
||||
m_TrackLayerCtrl->SetLayerSelection( *trackLayer );
|
||||
|
||||
m_TrackWidthCtrl->SetFocus();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -149,20 +168,6 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
m_mainSizerAccessor->GetContainingSizer()->Hide( s, true );
|
||||
}
|
||||
|
||||
if( m_vias )
|
||||
{
|
||||
setCommonVal( viaX, m_ViaXCtrl, m_viaX );
|
||||
setCommonVal( viaY, m_ViaYCtrl, m_viaY );
|
||||
setCommonVal( viaDiameter, m_ViaDiameterCtrl, m_viaDiameter );
|
||||
setCommonVal( viaDrill, m_ViaDrillCtrl, m_viaDrill );
|
||||
}
|
||||
else
|
||||
{
|
||||
// you cannot access sizers directly if the code was generated by wxFormBuilder
|
||||
wxSizer* s = m_viaStaticLine->GetContainingSizer();
|
||||
m_mainSizerAccessor->GetContainingSizer()->Hide( s, true );
|
||||
}
|
||||
|
||||
m_StdButtonsOK->SetDefault();
|
||||
|
||||
Layout();
|
||||
|
|
Loading…
Reference in New Issue