Skip to content
Permalink
Browse files

[attrtable] Fetch only necessary columns for expression filter

  • Loading branch information
m-kuhn committed Mar 2, 2014
1 parent ac29fc1 commit 2dcda50de393aeb6fedaf0b4505fb01b418c3382
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/app/qgsattributetabledialog.cpp
@@ -617,14 +617,13 @@ void QgsAttributeTableDialog::setFilterExpression( QString filterString )
QgisApp::instance()->messageBar()->pushMessage( tr( "Evaluation error" ), filterExpression.evalErrorString(), QgsMessageBar::WARNING, QgisApp::instance()->messageTimeout() );
}

// TODO: fetch only necessary columns
// QStringList columns = search.referencedColumns();
bool fetchGeom = filterExpression.needsGeometry();

QApplication::setOverrideCursor( Qt::WaitCursor );

filterExpression.setGeomCalculator( myDa );
QgsFeatureRequest request;
request.setSubsetOfAttributes( filterExpression.referencedColumns(), mLayer->pendingFields() );
if ( !fetchGeom )
{
request.setFlags( QgsFeatureRequest::NoGeometry );

0 comments on commit 2dcda50

Please sign in to comment.
You can’t perform that action at this time.