From 5f6b4bfac2d058d65dc9016d389a518ac48fe199 Mon Sep 17 00:00:00 2001 From: Radim Blazek Date: Fri, 7 Jun 2013 12:17:23 +0200 Subject: [PATCH] ogr debug fix --- src/providers/ogr/qgsogrprovider.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/providers/ogr/qgsogrprovider.cpp b/src/providers/ogr/qgsogrprovider.cpp index e0acce6f477..79eb7f6df90 100644 --- a/src/providers/ogr/qgsogrprovider.cpp +++ b/src/providers/ogr/qgsogrprovider.cpp @@ -528,6 +528,8 @@ QStringList QgsOgrProvider::subLayers() const QString theLayerName = FROM8( OGR_FD_GetName( fdef ) ); OGRwkbGeometryType layerGeomType = OGR_FD_GetGeomType( fdef ); + QgsDebugMsg( QString("layerGeomType = %1").arg( layerGeomType ) ); + if ( layerGeomType != wkbUnknown ) { int theLayerFeatureCount = OGR_L_GetFeatureCount( layer, 0 ); @@ -535,10 +537,10 @@ QStringList QgsOgrProvider::subLayers() const QString geom = ogrWkbGeometryTypeName( layerGeomType ); mSubLayerList << QString( "%1:%2:%3:%4" ).arg( i ).arg( theLayerName ).arg( theLayerFeatureCount == -1 ? tr( "Unknown" ) : QString::number( theLayerFeatureCount ) ).arg( geom ); - QgsDebugMsg( "Unknown geometry type, count features for each geometry type" ); } else { + QgsDebugMsg( "Unknown geometry type, count features for each geometry type" ); // Add virtual sublayers for supported geometry types if layer type is unknown // Count features for geometry types QMap fCount;