Initialize filters with current values.

Fixes: lp:1787403
* https://bugs.launchpad.net/kicad/+bug/1787403
This commit is contained in:
Jeff Young 2018-08-19 11:56:18 +01:00
parent bb5e6bbd79
commit bbb76a0de0
1 changed files with 16 additions and 0 deletions

View File

@ -61,6 +61,7 @@ private:
void visitItem( PICKED_ITEMS_LIST* aUndoList, TRACK* aItem );
void processItem( PICKED_ITEMS_LIST* aUndoList, TRACK* aItem );
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
void OnUpdateUI( wxUpdateUIEvent& event ) override;
@ -210,6 +211,21 @@ void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::buildNetclassesGrid()
}
bool DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::TransferDataToWindow()
{
auto item = dynamic_cast<BOARD_CONNECTED_ITEM*>( m_parent->GetCurItem() );
if( item )
{
m_netFilter->SetStringSelection( item->GetNetname() );
m_netclassFilter->SetStringSelection( item->GetNet()->GetClassName() );
m_layerFilter->SetLayerSelection( item->GetLayer() );
}
return true;
}
void DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS::OnUpdateUI( wxUpdateUIEvent& )
{
m_trackWidthSelectBox->Enable( m_setToSpecifiedValues->GetValue() );