mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Followup f4e356b
This commit is contained in:
parent
f4e356bcef
commit
0ea638cbc0
@ -86,6 +86,7 @@ class QgsExpressionBuilderWidget : QWidget
|
|||||||
|
|
||||||
/** Loads field names and values from the specified map.
|
/** Loads field names and values from the specified map.
|
||||||
* @note The field values must be quoted appropriately if they are strings.
|
* @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 );
|
void loadFieldsAndValues(const QMap<QString, QStringList>& fieldValues );
|
||||||
|
|
||||||
|
@ -114,16 +114,13 @@ void QgsExpressionBuilderWidget::currentChanged( const QModelIndex &index, const
|
|||||||
const QStringList& values = mFieldValues[item->text()];
|
const QStringList& values = mFieldValues[item->text()];
|
||||||
mValueListWidget->setUpdatesEnabled( false );
|
mValueListWidget->setUpdatesEnabled( false );
|
||||||
mValueListWidget->blockSignals( true );
|
mValueListWidget->blockSignals( true );
|
||||||
foreach ( const QString& value, values )
|
mValueListWidget->addItems( values );
|
||||||
mValueListWidget->addItem( value );
|
|
||||||
|
|
||||||
mValueListWidget->setUpdatesEnabled( true );
|
mValueListWidget->setUpdatesEnabled( true );
|
||||||
mValueListWidget->blockSignals( false );
|
mValueListWidget->blockSignals( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mLoadGroupBox->setVisible( item->getItemType() == QgsExpressionItem::Field && mLayer );
|
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.
|
// Show the help for the current item.
|
||||||
QString help = loadFunctionHelp( item );
|
QString help = loadFunctionHelp( item );
|
||||||
|
@ -128,6 +128,7 @@ class GUI_EXPORT QgsExpressionBuilderWidget : public QWidget, private Ui::QgsExp
|
|||||||
|
|
||||||
/** Loads field names and values from the specified map.
|
/** Loads field names and values from the specified map.
|
||||||
* @note The field values must be quoted appropriately if they are strings.
|
* @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 );
|
void loadFieldsAndValues( const QMap<QString, QStringList>& fieldValues );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user