Skip to content
Permalink
Browse files

Consider new wkb types for postgis in browser. Fixes second part of #…

  • Loading branch information
mhugent committed Jun 4, 2015
1 parent 9d38b71 commit 12134a02838290160d76a47ecdb86de9469c6978
Showing with 5 additions and 13 deletions.
  1. +5 −13 src/providers/postgres/qgspostgresdataitems.cpp
@@ -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:

0 comments on commit 12134a0

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