Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #2316 from slarosa/fix_return_pressed_we
[attribute table] enable returnPressed signal for the search widget
  • Loading branch information
m-kuhn committed Sep 16, 2015
2 parents 0daf6dd + c823bcd commit f0f53b1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgsattributetabledialog.cpp
Expand Up @@ -469,6 +469,7 @@ void QgsAttributeTableDialog::filterColumnChanged( QObject* filterAction )
}
else
{
connect( mCurrentSearchWidgetWrapper, SIGNAL( expressionChanged() ), SLOT( filterQueryAccepted() ) );
mApplyFilterButton->setVisible( true );
}

Expand Down Expand Up @@ -504,6 +505,10 @@ void QgsAttributeTableDialog::filterShowAll()
mFilterButton->setDefaultAction( mActionShowAllFilter );
mFilterButton->setPopupMode( QToolButton::InstantPopup );
mFilterQuery->setVisible( false );
if ( mCurrentSearchWidgetWrapper != 0 )
{
mCurrentSearchWidgetWrapper->widget()->setVisible( false );
}
mApplyFilterButton->setVisible( false );
mMainView->setFilterMode( QgsAttributeTableFilterModel::ShowAll );
}
Expand Down
1 change: 1 addition & 0 deletions src/gui/editorwidgets/core/qgssearchwidgetwrapper.h
Expand Up @@ -70,6 +70,7 @@ class GUI_EXPORT QgsSearchWidgetWrapper : public QgsWidgetWrapper
signals:

void expressionChanged( QString exp );
void expressionChanged();

protected slots:

Expand Down
1 change: 1 addition & 0 deletions src/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.cpp
Expand Up @@ -96,6 +96,7 @@ void QgsDefaultSearchWidgetWrapper::initWidget( QWidget* widget )
mContainer->layout()->addWidget( mLineEdit );
mContainer->layout()->addWidget( mCheckbox );
connect( mLineEdit, SIGNAL( textChanged( QString ) ), this, SLOT( setExpression( QString ) ) );
connect( mLineEdit, SIGNAL( returnPressed() ), this, SIGNAL( expressionChanged() ) );
connect( mCheckbox, SIGNAL( stateChanged( int ) ), this, SLOT( setCaseString( int ) ) );
mCheckbox->setChecked( Qt::Unchecked );
mCaseString = "ILIKE";
Expand Down
1 change: 1 addition & 0 deletions src/gui/editorwidgets/qgsdefaultsearchwidgetwrapper.h
Expand Up @@ -36,6 +36,7 @@ class GUI_EXPORT QgsDefaultSearchWidgetWrapper : public QgsSearchWidgetWrapper
public:
QString expression() override;
bool applyDirectly() override;

protected slots:
void setExpression( QString exp ) override;

Expand Down

0 comments on commit f0f53b1

Please sign in to comment.