Skip to content
Permalink
Browse files

Make sure recent expression group is always listed last (fix #13462)

  • Loading branch information
nyalldawson committed Oct 5, 2015
1 parent 74110bb commit 1fd3ed7de6c7cec9c251a7db1f8e7d4c2d12bbc4
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/qgsexpressionbuilderwidget.cpp
@@ -359,7 +359,8 @@ void QgsExpressionBuilderWidget::registerItem( QString group,
// If the group doesn't exist yet we make it first.
QgsExpressionItem *newgroupNode = new QgsExpressionItem( QgsExpression::group( group ), "", QgsExpressionItem::Header );
newgroupNode->setData( group, Qt::UserRole );
newgroupNode->setData( group == "Recent (Selection)" ? 2 : 1, QgsExpressionItem::CustomSortRole );
//Recent group should always be last group
newgroupNode->setData( group.startsWith( "Recent (" ) ? 2 : 1, QgsExpressionItem::CustomSortRole );
newgroupNode->appendRow( item );
newgroupNode->setBackground( QBrush( QColor( "#eee" ) ) );
mModel->appendRow( newgroupNode );

0 comments on commit 1fd3ed7

Please sign in to comment.
You can’t perform that action at this time.