Skip to content

Commit

Permalink
[options search] expand item when found in a tree
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Feb 6, 2018
1 parent 9389be8 commit 90f1d7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsoptionsdialoghighlightwidgetsimpl.cpp
Expand Up @@ -214,13 +214,14 @@ bool QgsOptionsDialogHighlightTree::highlightText( const QString &text )
setChildrenVisible( item, true );

QTreeWidgetItem *parent = item;
while ( ( parent = parent->parent() ) )
while ( parent )
{
if ( mTreeInitialExpand.contains( parent ) )
break;
mTreeInitialExpand.insert( parent, parent->isExpanded() );
parent->setExpanded( true );
parent->setHidden( false );
parent = parent->parent();
}
}
}
Expand Down

0 comments on commit 90f1d7b

Please sign in to comment.