Skip to content

Commit

Permalink
Add item from value list on double click
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Oct 16, 2011
1 parent 5797360 commit 17d326e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/gui/qgsexpressionbuilder.cpp
Expand Up @@ -202,6 +202,7 @@ void QgsExpressionBuilderWidget::on_txtExpressionString_textChanged()
// we don't show the user an error as it will be confusing.
if ( text.isEmpty() )
{
this->lblPreview->setText("");
this->lblPreview->setStyleSheet("");
this->txtExpressionString->setToolTip("");
this->lblPreview->setToolTip("");
Expand Down Expand Up @@ -264,6 +265,11 @@ void QgsExpressionBuilderWidget::on_lblPreview_linkActivated(QString link)
mv->exec();
}

void QgsExpressionBuilderWidget::on_mValueListWidget_itemDoubleClicked(QListWidgetItem *item)
{
txtExpressionString->insertPlainText( " " + item->text() + " " );
}

void QgsExpressionBuilderWidget::operatorButtonClicked()
{
QPushButton* button = dynamic_cast<QPushButton*>( sender() );
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsexpressionbuilder.h
Expand Up @@ -136,6 +136,7 @@ public slots:
void on_txtExpressionString_textChanged();
void on_txtSearchEdit_textChanged();
void on_lblPreview_linkActivated(QString link);
void on_mValueListWidget_itemDoubleClicked(QListWidgetItem* item);
void operatorButtonClicked();
void showContextMenu( const QPoint & );
void loadSampleValues();
Expand Down

0 comments on commit 17d326e

Please sign in to comment.