Fixed disappearing components in COMPONENT_TREE in library editor
The reason the component tree widget was cleared on Windows is the fact m_adapter->UpdateSearchString( m_query_ctrl->GetLineText( 0 ) ) is called on any change of the symbol. But if m_query_ctrl is empty, m_query_ctrl->GetLineText( 0 ) returns the "hint" (currently the word "Search") not the actual value, so there is no "candidate" symbol in list. Using m_query_ctrl->GetValue() returns the actual value and fixes this issue. Fixes: lp:1737132 * https://bugs.launchpad.net/kicad/+bug/1737132
This commit is contained in:
parent
8e764f85a4
commit
33c2d6e4ba
|
@ -149,8 +149,9 @@ void COMPONENT_TREE::Regenerate()
|
|||
else
|
||||
current = getState();
|
||||
|
||||
m_adapter->UpdateSearchString( m_query_ctrl->GetLineText( 0 ) );
|
||||
m_filtering = !m_query_ctrl->IsEmpty();
|
||||
wxString filter = m_query_ctrl->GetValue();
|
||||
m_adapter->UpdateSearchString( filter );
|
||||
m_filtering = !filter.IsEmpty();
|
||||
postPreselectEvent();
|
||||
|
||||
// Restore the state
|
||||
|
|
Loading…
Reference in New Issue