Skip to content

Commit

Permalink
Fix sorting of expressions in relation reference widget
Browse files Browse the repository at this point in the history
Fix #15451
  • Loading branch information
m-kuhn committed Sep 20, 2016
1 parent 41c7a95 commit 65e221c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/gui/editorwidgets/qgsrelationreferencewidget.cpp
Expand Up @@ -532,12 +532,7 @@ void QgsRelationReferenceWidget::init()
mFeatureListModel->setInjectNull( mAllowNull );
if ( mOrderByValue )
{
const QStringList referencedColumns = QgsExpression( mReferencedLayer->displayExpression() ).referencedColumns();
if ( !referencedColumns.isEmpty() )
{
int sortIdx = mReferencedLayer->fieldNameIndex( referencedColumns.first() );
mFilterModel->sort( sortIdx );
}
mFilterModel->sort( mReferencedLayer->displayExpression() );
}

mComboBox->setModel( mFeatureListModel );
Expand Down

0 comments on commit 65e221c

Please sign in to comment.