Skip to content

Commit

Permalink
Consider new wkb types for postgis in browser. Fixes second part of #…
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent committed Jun 4, 2015
1 parent 9d38b71 commit 12134a0
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/providers/postgres/qgspostgresdataitems.cpp
Expand Up @@ -359,24 +359,16 @@ QgsPGLayerItem *QgsPGSchemaItem::createLayer( QgsPostgresLayerProperty layerProp
QString tip = tr( "%1 as %2 in %3" ).arg( layerProperty.geometryColName ).arg( QgsPostgresConn::displayStringForWkbType( wkbType ) ).arg( layerProperty.srids[0] );

QgsLayerItem::LayerType layerType;
switch ( wkbType )
QgsWKBTypes::GeometryType geomType = QgsWKBTypes::geometryType(( QgsWKBTypes::Type )wkbType );
switch ( geomType )
{
case QGis::WKBPoint:
case QGis::WKBPoint25D:
case QGis::WKBMultiPoint:
case QGis::WKBMultiPoint25D:
case QgsWKBTypes::PointGeometry:
layerType = QgsLayerItem::Point;
break;
case QGis::WKBLineString:
case QGis::WKBLineString25D:
case QGis::WKBMultiLineString:
case QGis::WKBMultiLineString25D:
case QgsWKBTypes::LineGeometry:
layerType = QgsLayerItem::Line;
break;
case QGis::WKBPolygon:
case QGis::WKBPolygon25D:
case QGis::WKBMultiPolygon:
case QGis::WKBMultiPolygon25D:
case QgsWKBTypes::PolygonGeometry:
layerType = QgsLayerItem::Polygon;
break;
default:
Expand Down

0 comments on commit 12134a0

Please sign in to comment.