Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix sorting of expressions in relation reference widget
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.