7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-14 12:49:34 +00:00

Highlight only leaf nodes when filtering lib tree.

Fixes: lp:1787709
* https://bugs.launchpad.net/kicad/+bug/1787709
This commit is contained in:
Jeff Young 2018-08-19 17:57:09 +01:00
parent 53cd923305
commit e47351d1a6

View File

@ -382,7 +382,8 @@ LIB_TREE_NODE* LIB_TREE_MODEL_ADAPTER::ShowResults()
FindAndExpand( m_tree,
[]( LIB_TREE_NODE const* n )
{
return /*n->Type == LIB_TREE_NODE::TYPE::LIBID &&*/ n->Score > 1;
// return leaf nodes with some level of matching
return n->Children.size() == 0 && n->Score > 1;
},
&highScore );