Skip to content
Permalink
Browse files

fix data retrieval in attribute table from geometryless spatialite ta…

…bles
  • Loading branch information
jef-n committed Sep 30, 2013
1 parent 52ac084 commit 814ae4c7814211dc839eb01612239d6eb4aed296
@@ -646,4 +646,6 @@ void QgsAttributeTableModel::prefetchColumnData( int column )
void QgsAttributeTableModel::setRequest( const QgsFeatureRequest& request )
{
mFeatureRequest = request;
if( layer() && !layer()->hasGeometryType() )
mFeatureRequest.setFlags( mFeatureRequest.flags() | QgsFeatureRequest::NoGeometry );
}
@@ -145,7 +145,10 @@ bool QgsSpatiaLiteFeatureIterator::close()
bool QgsSpatiaLiteFeatureIterator::prepareStatement( QString whereClause )
{
if ( !( mRequest.flags() & QgsFeatureRequest::NoGeometry ) && P->mGeometryColumn.isNull() )
{
QgsMessageLog::logMessage( QObject::tr( "Trying to fetch geometry on a layer without geometry." ), QObject::tr( "SpatiaLite" ) );
return false;
}

try
{

0 comments on commit 814ae4c

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