Skip to content

Commit 0ea638c

Browse files
committedJun 27, 2015
Followup f4e356b
1 parent f4e356b commit 0ea638c

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed
 

‎python/gui/qgsexpressionbuilderwidget.sip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ class QgsExpressionBuilderWidget : QWidget
8686

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

‎src/gui/qgsexpressionbuilderwidget.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,13 @@ void QgsExpressionBuilderWidget::currentChanged( const QModelIndex &index, const
114114
const QStringList& values = mFieldValues[item->text()];
115115
mValueListWidget->setUpdatesEnabled( false );
116116
mValueListWidget->blockSignals( true );
117-
foreach ( const QString& value, values )
118-
mValueListWidget->addItem( value );
119-
117+
mValueListWidget->addItems( values );
120118
mValueListWidget->setUpdatesEnabled( true );
121119
mValueListWidget->blockSignals( false );
122120
}
123121

124-
125122
mLoadGroupBox->setVisible( item->getItemType() == QgsExpressionItem::Field && mLayer );
126-
mValueGroupBox->setVisible( item->getItemType() == QgsExpressionItem::Field && mLayer || mValueListWidget->count() > 0 );
123+
mValueGroupBox->setVisible(( item->getItemType() == QgsExpressionItem::Field && mLayer ) || mValueListWidget->count() > 0 );
127124

128125
// Show the help for the current item.
129126
QString help = loadFunctionHelp( item );

‎src/gui/qgsexpressionbuilderwidget.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp
128128

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

0 commit comments

Comments
 (0)
Please sign in to comment.