Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix clearing multipoint should reset z/m status
  • Loading branch information
nyalldawson committed Sep 25, 2017
1 parent ffbf93a commit 97930d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/core/geometry/qgsmultipoint.sip
Expand Up @@ -29,6 +29,8 @@ class QgsMultiPointV2: QgsGeometryCollection

virtual bool fromWkt( const QString &wkt );

virtual void clear();


virtual QDomElement asGML2( QDomDocument &doc, int precision = 17, const QString &ns = "gml" ) const;

Expand Down
6 changes: 6 additions & 0 deletions src/core/geometry/qgsmultipoint.cpp
Expand Up @@ -55,6 +55,12 @@ bool QgsMultiPointV2::fromWkt( const QString &wkt )
return fromCollectionWkt( collectionWkt, QList<QgsAbstractGeometry *>() << new QgsPoint, QStringLiteral( "Point" ) );
}

void QgsMultiPointV2::clear()
{
QgsGeometryCollection::clear();
mWkbType = QgsWkbTypes::MultiPoint;
}

QDomElement QgsMultiPointV2::asGML2( QDomDocument &doc, int precision, const QString &ns ) const
{
QDomElement elemMultiPoint = doc.createElementNS( ns, QStringLiteral( "MultiPoint" ) );
Expand Down
1 change: 1 addition & 0 deletions src/core/geometry/qgsmultipoint.h
Expand Up @@ -34,6 +34,7 @@ class CORE_EXPORT QgsMultiPointV2: public QgsGeometryCollection
QgsMultiPointV2 *toCurveType() const override SIP_FACTORY;

bool fromWkt( const QString &wkt ) override;
void clear() override;

// inherited: int wkbSize() const;
// inherited: unsigned char* asWkb( int& binarySize ) const;
Expand Down

0 comments on commit 97930d1

Please sign in to comment.