mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
parent
cd1d44be9d
commit
9ad4d39cf1
@ -537,12 +537,7 @@ void QgsRelationReferenceWidget::init()
|
|||||||
mFeatureListModel->setInjectNull( mAllowNull );
|
mFeatureListModel->setInjectNull( mAllowNull );
|
||||||
if ( mOrderByValue )
|
if ( mOrderByValue )
|
||||||
{
|
{
|
||||||
const QStringList referencedColumns = QgsExpression( mReferencedLayer->displayExpression() ).referencedColumns();
|
mFilterModel->sort( mReferencedLayer->displayExpression() );
|
||||||
if ( !referencedColumns.isEmpty() )
|
|
||||||
{
|
|
||||||
int sortIdx = mReferencedLayer->fieldNameIndex( referencedColumns.first() );
|
|
||||||
mFilterModel->sort( sortIdx );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mComboBox->setModel( mFeatureListModel );
|
mComboBox->setModel( mFeatureListModel );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user