Skip to content
Permalink
Browse files

spatialite provider: accept empty tables from spatialite 4 (fixes #7664)

  • Loading branch information
jef-n committed Jul 12, 2013
1 parent c80a1f4 commit cafc3677fdcd4fa999e6b0b609beaaa68d41e8e9
Showing with 11 additions and 5 deletions.
  1. +11 −5 src/providers/spatialite/qgsspatialiteprovider.cpp
@@ -4164,7 +4164,7 @@ bool QgsSpatiaLiteProvider::checkLayerTypeAbstractInterface( gaiaVectorLayerPtr
case GAIA_VECTOR_VIRTUAL:
mVShapeBased = true;
break;
};
}

if ( lyr->AuthInfos )
{
@@ -4400,7 +4400,8 @@ bool QgsSpatiaLiteProvider::getGeometryDetailsAbstractInterface( gaiaVectorLayer
default:
geomType = QGis::WKBUnknown;
break;
};
}

mSrid = lyr->Srid;
if ( lyr->SpatialIndex == GAIA_SPATIAL_INDEX_RTREE )
{
@@ -4424,7 +4425,7 @@ bool QgsSpatiaLiteProvider::getGeometryDetailsAbstractInterface( gaiaVectorLayer
case GAIA_XY_Z_M:
nDims = GAIA_XY_Z_M;
break;
};
}

if ( mViewBased && spatialIndexRTree )
getViewSpatialIndexName();
@@ -4915,9 +4916,14 @@ bool QgsSpatiaLiteProvider::getTableSummaryAbstractInterface( gaiaVectorLayerPtr
layerExtent.set( lyr->ExtentInfos->MinX, lyr->ExtentInfos->MinY,
lyr->ExtentInfos->MaxX, lyr->ExtentInfos->MaxY );
numberFeatures = lyr->ExtentInfos->Count;
return true;
}
return false;
else
{
layerExtent.setMinimal();
numberFeatures = 0;
}

return true;
}
#endif

0 comments on commit cafc367

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