Skip to content

Commit ded943d

Browse files
committedSep 25, 2012
update bindings
1 parent efc4cb6 commit ded943d

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed
 

‎python/core/conversions.sip

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,8 +1490,6 @@ template <TYPE>
14901490
%End
14911491

14921492
%ConvertToTypeCode
1493-
PyObject *tobj;
1494-
14951493
// Check the type if that is all that is required.
14961494
if (sipIsErr == NULL)
14971495
{
@@ -1500,7 +1498,7 @@ template <TYPE>
15001498

15011499
for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
15021500
{
1503-
if (!sipCanConvertToInstance(tobj, sipClass_TYPE, SIP_NOT_NONE))
1501+
if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, SIP_NOT_NONE))
15041502
return 0;
15051503
}
15061504

@@ -1513,7 +1511,7 @@ template <TYPE>
15131511
{
15141512
int state;
15151513

1516-
TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(tobj, sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
1514+
TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
15171515

15181516
if (*sipIsErr)
15191517
{

‎python/core/qgsvectorlayer.sip

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,10 @@ class QgsVectorLayer : QgsMapLayer
395395
/**Changes the specified geometry such that it has no intersections with other
396396
* polygon (or multipolygon) geometries in this vector layer
397397
* @param geom geometry to modify
398+
* @param ignoreFeatures list of feature ids where intersections should be ignored
398399
* @return 0 in case of success
399400
*/
400-
int removePolygonIntersections( QgsGeometry* geom );
401+
int removePolygonIntersections( QgsGeometry* geom, QgsFeatureIds ignoreFeatures = QgsFeatureIds() );
401402

402403
/** Adds topological points for every vertex of the geometry.
403404
* @param geom the geometry where each vertex is added to segments of other features

‎src/core/qgsgeometry.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ email : morb at ozemail dot com dot au
3030

3131
#include "qgspoint.h"
3232
#include "qgscoordinatetransform.h"
33+
#include "qgsfeature.h"
34+
3335
#include <QSet>
3436

3537
class QgsVectorLayer;
@@ -432,10 +434,10 @@ class CORE_EXPORT QgsGeometry
432434
* 1 if geometry is not of polygon type,
433435
* 2 if avoid intersection would change the geometry type,
434436
* 3 other error during intersection removal
435-
* @ignoreFeatures possibility to give a list of features where intersections should be ignored
437+
* @param ignoreFeatures possibility to give a list of features where intersections should be ignored (not available in python bindings)
436438
* @note added in 1.5
437439
*/
438-
int avoidIntersections( QMap<QgsVectorLayer*, QSet<qint64> > ignoreFeatures = QMap<QgsVectorLayer*, QSet<qint64> >() );
440+
int avoidIntersections( QMap<QgsVectorLayer*, QSet<QgsFeatureId> > ignoreFeatures = QMap<QgsVectorLayer*, QSet<QgsFeatureId> >() );
439441

440442
class Error
441443
{

0 commit comments

Comments
 (0)
Please sign in to comment.