Skip to content
Permalink
Browse files

Fix clearing multisurface should reset dimensionality

  • Loading branch information
nyalldawson committed Sep 26, 2017
1 parent 31730f4 commit 4d989f8fb62daf682494e842659715596e62681f
@@ -22,6 +22,8 @@ class QgsMultiPolygonV2: QgsMultiSurface
QgsMultiPolygonV2();
virtual QString geometryType() const;

virtual void clear();

virtual QgsMultiPolygonV2 *clone() const /Factory/;


@@ -22,6 +22,8 @@ class QgsMultiSurface: QgsGeometryCollection
QgsMultiSurface();
virtual QString geometryType() const;

virtual void clear();

virtual QgsMultiSurface *clone() const /Factory/;

virtual QgsMultiSurface *toCurveType() const /Factory/;
@@ -33,6 +33,12 @@ QString QgsMultiPolygonV2::geometryType() const
return QStringLiteral( "MultiPolygon" );
}

void QgsMultiPolygonV2::clear()
{
QgsMultiSurface::clear();
mWkbType = QgsWkbTypes::MultiPolygon;
}

QgsMultiPolygonV2 *QgsMultiPolygonV2::clone() const
{
return new QgsMultiPolygonV2( *this );
@@ -30,6 +30,7 @@ class CORE_EXPORT QgsMultiPolygonV2: public QgsMultiSurface
public:
QgsMultiPolygonV2();
QString geometryType() const override;
void clear() override;
QgsMultiPolygonV2 *clone() const override SIP_FACTORY;

bool fromWkt( const QString &wkt ) override;
@@ -34,6 +34,12 @@ QString QgsMultiSurface::geometryType() const
return QStringLiteral( "MultiSurface" );
}

void QgsMultiSurface::clear()
{
QgsGeometryCollection::clear();
mWkbType = QgsWkbTypes::MultiSurface;
}

QgsMultiSurface *QgsMultiSurface::clone() const
{
return new QgsMultiSurface( *this );
@@ -30,6 +30,7 @@ class CORE_EXPORT QgsMultiSurface: public QgsGeometryCollection
public:
QgsMultiSurface();
QString geometryType() const override;
void clear() override;
QgsMultiSurface *clone() const override SIP_FACTORY;
QgsMultiSurface *toCurveType() const override SIP_FACTORY;
bool fromWkt( const QString &wkt ) override;

0 comments on commit 4d989f8

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