Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Followup f4e356b
  • Loading branch information
nyalldawson committed Jun 27, 2015
1 parent f4e356b commit 0ea638c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions python/gui/qgsexpressionbuilderwidget.sip
Expand Up @@ -86,6 +86,7 @@ class QgsExpressionBuilderWidget : QWidget

/** Loads field names and values from the specified map.
* @note The field values must be quoted appropriately if they are strings.
* @note added in QGIS 2.12
*/
void loadFieldsAndValues(const QMap<QString, QStringList>& fieldValues );

Expand Down
7 changes: 2 additions & 5 deletions src/gui/qgsexpressionbuilderwidget.cpp
Expand Up @@ -114,16 +114,13 @@ void QgsExpressionBuilderWidget::currentChanged( const QModelIndex &index, const
const QStringList& values = mFieldValues[item->text()];
mValueListWidget->setUpdatesEnabled( false );
mValueListWidget->blockSignals( true );
foreach ( const QString& value, values )
mValueListWidget->addItem( value );

mValueListWidget->addItems( values );
mValueListWidget->setUpdatesEnabled( true );
mValueListWidget->blockSignals( false );
}


mLoadGroupBox->setVisible( item->getItemType() == QgsExpressionItem::Field && mLayer );
mValueGroupBox->setVisible( item->getItemType() == QgsExpressionItem::Field && mLayer || mValueListWidget->count() > 0 );
mValueGroupBox->setVisible(( item->getItemType() == QgsExpressionItem::Field && mLayer ) || mValueListWidget->count() > 0 );

// Show the help for the current item.
QString help = loadFunctionHelp( item );
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsexpressionbuilderwidget.h
Expand Up @@ -128,6 +128,7 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp

/** Loads field names and values from the specified map.
* @note The field values must be quoted appropriately if they are strings.
* @note added in QGIS 2.12
*/
void loadFieldsAndValues( const QMap<QString, QStringList>& fieldValues );

Expand Down

0 comments on commit 0ea638c

Please sign in to comment.