Skip to content

Commit

Permalink
fix filtered features number over the window title
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa authored and m-kuhn committed Sep 15, 2015
1 parent 59c43f1 commit 7065762
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/app/qgsattributetabledialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void QgsAttributeTableDialog::keyPressEvent( QKeyEvent* event )

void QgsAttributeTableDialog::columnBoxInit()
{
Q_FOREACH ( QAction* a, mFilterColumnsMenu->actions() )
Q_FOREACH( QAction* a, mFilterColumnsMenu->actions() )
{
mFilterColumnsMenu->removeAction( a );
mFilterActionMapper->removeMappings( a );
Expand All @@ -329,7 +329,7 @@ void QgsAttributeTableDialog::columnBoxInit()

QList<QgsField> fields = mLayer->fields().toList();

Q_FOREACH ( const QgsField field, fields )
Q_FOREACH( const QgsField field, fields )
{
int idx = mLayer->fieldNameIndex( field.name() );
if ( idx < 0 )
Expand Down Expand Up @@ -506,7 +506,6 @@ void QgsAttributeTableDialog::filterShowAll()
mFilterQuery->setVisible( false );
mApplyFilterButton->setVisible( false );
mMainView->setFilterMode( QgsAttributeTableFilterModel::ShowAll );
updateTitle();
}

void QgsAttributeTableDialog::filterSelected()
Expand Down Expand Up @@ -746,7 +745,6 @@ void QgsAttributeTableDialog::filterQueryChanged( const QString& query )
}

setFilterExpression( str );
updateTitle();
}

void QgsAttributeTableDialog::filterQueryAccepted()
Expand Down Expand Up @@ -782,8 +780,6 @@ void QgsAttributeTableDialog::setFilterExpression( QString filterString )
}
}

mMainView->setFilterMode( QgsAttributeTableFilterModel::ShowFilteredList );

QgsFeatureIds filteredFeatures;
QgsDistanceArea myDa;

Expand All @@ -804,7 +800,7 @@ void QgsAttributeTableDialog::setFilterExpression( QString filterString )
<< QgsExpressionContextUtils::projectScope()
<< QgsExpressionContextUtils::layerScope( mLayer );

if ( ! filterExpression.prepare( &context ) )
if ( !filterExpression.prepare( &context ) )
{
QgisApp::instance()->messageBar()->pushMessage( tr( "Evaluation error" ), filterExpression.evalErrorString(), QgsMessageBar::WARNING, QgisApp::instance()->messageTimeout() );
}
Expand Down Expand Up @@ -846,4 +842,5 @@ void QgsAttributeTableDialog::setFilterExpression( QString filterString )
QgisApp::instance()->messageBar()->pushMessage( tr( "Error filtering" ), filterExpression.evalErrorString(), QgsMessageBar::WARNING, QgisApp::instance()->messageTimeout() );
return;
}
mMainView->setFilterMode( QgsAttributeTableFilterModel::ShowFilteredList );
}

0 comments on commit 7065762

Please sign in to comment.