Force regeneration of the lib tree on first load
Just setting the text field is not guaranteed to fire
a text event, so we must forcefully call the regenerate
function to ensure the preselect is handled.
Fixes https://gitlab.com/kicad/code/kicad/issues/4105
(Cherry-picked from 63b53c3968
)
This commit is contained in:
parent
1b967a07e5
commit
475385d876
|
@ -124,8 +124,10 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable, LIB_TREE_MODEL_ADAP
|
|||
{
|
||||
m_query_ctrl->SetHint( _( "Filter" ) );
|
||||
m_query_ctrl->SetFocus();
|
||||
m_query_ctrl->SetValue( wxEmptyString ); // SetValue() is required here to kick off
|
||||
// initial sorting and pre-selection.
|
||||
m_query_ctrl->SetValue( wxEmptyString );
|
||||
|
||||
// Force an update of the adapter with the empty text to ensure preselect is done
|
||||
Regenerate( false );
|
||||
}
|
||||
|
||||
// There may be a part preselected in the model. Make sure it is displayed.
|
||||
|
|
Loading…
Reference in New Issue