Followup f4e356b

This commit is contained in:
Nyall Dawson 2015-06-27 14:11:44 +10:00
parent f4e356bcef
commit 0ea638cbc0
3 changed files with 4 additions and 5 deletions

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );