mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
fix data retrieval in attribute table from geometryless spatialite tables
This commit is contained in:
parent
52ac0845d4
commit
814ae4c781
@ -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
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user