@@ -41,10 +41,12 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
4141 expressionTree->setModel ( mProxyModel );
4242
4343 expressionTree->setContextMenuPolicy ( Qt::CustomContextMenu );
44- connect ( this , SIGNAL ( expressionParsed ( bool ) ), this , SLOT ( setExpressionState ) );
44+ connect ( this , SIGNAL ( expressionParsed ( bool ) ), this , SLOT ( setExpressionState ( bool ) ) );
4545 connect ( expressionTree, SIGNAL ( customContextMenuRequested ( const QPoint & ) ), this , SLOT ( showContextMenu ( const QPoint & ) ) );
46+ connect ( expressionTree->selectionModel (), SIGNAL ( currentChanged ( const QModelIndex &, const QModelIndex & ) ),
47+ this , SLOT ( currentChanged ( const QModelIndex &, const QModelIndex & ) ) );
4648
47- foreach ( QPushButton* button, this -> mOperatorsGroupBox ->findChildren <QPushButton *>() )
49+ foreach ( QPushButton* button, mOperatorsGroupBox ->findChildren <QPushButton *>() )
4850 {
4951 connect ( button, SIGNAL ( pressed () ), this , SLOT ( operatorButtonClicked () ) );
5052 }
@@ -99,7 +101,7 @@ void QgsExpressionBuilderWidget::setLayer( QgsVectorLayer *layer )
99101 mLayer = layer;
100102}
101103
102- void QgsExpressionBuilderWidget::on_expressionTree_clicked ( const QModelIndex &index )
104+ void QgsExpressionBuilderWidget::currentChanged ( const QModelIndex &index, const QModelIndex & )
103105{
104106 // Get the item
105107 QModelIndex idx = mProxyModel ->mapToSource ( index );
@@ -214,9 +216,9 @@ void QgsExpressionBuilderWidget::registerItem( QString group,
214216 }
215217}
216218
217- bool QgsExpressionBuilderWidget::isExpressionVaild ()
219+ bool QgsExpressionBuilderWidget::isExpressionValid ()
218220{
219- return mExpressionVaild ;
221+ return mExpressionValid ;
220222}
221223
222224QString QgsExpressionBuilderWidget::getExpressionString ()
@@ -370,7 +372,7 @@ void QgsExpressionBuilderWidget::loadAllValues()
370372
371373void QgsExpressionBuilderWidget::setExpressionState ( bool state )
372374{
373- mExpressionVaild = state;
375+ mExpressionValid = state;
374376}
375377
376378QString QgsExpressionBuilderWidget::loadFunctionHelp ( QgsExpressionItem* functionName )
0 commit comments