Skip to content
Permalink
Browse files

clear list of resulting values

  • Loading branch information
signedav committed Dec 16, 2019
1 parent 9ebe42a commit e73fe50d0af1a17484598e9be1cfc6cd07c21316
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/qgsexpressionbuilderwidget.cpp
@@ -468,7 +468,7 @@ void QgsExpressionBuilderWidget::fillFieldValues( const QString &fieldName, int
const QgsEditorWidgetSetup setup = fields.at( fieldIndex ).editorWidgetSetup();
const QgsFieldFormatter *formatter = QgsApplication::fieldFormatterRegistry()->fieldFormatter( setup.type() );

const QgsVectorLayer * layer = mLayer;
const QgsVectorLayer *layer = mLayer;
int layerFieldIndex = fieldIndex;

// if it's a request for the values of the referenced layer
@@ -481,6 +481,7 @@ void QgsExpressionBuilderWidget::fillFieldValues( const QString &fieldName, int
QList<QVariant> values = layer->uniqueValues( layerFieldIndex, countLimit ).toList();
std::sort( values.begin(), values.end() );

mValuesModel->clear();
for ( const QVariant &value : qgis::as_const( values ) )
{
QString strValue;

0 comments on commit e73fe50

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