diff --git a/python/core/conversions.sip b/python/core/conversions.sip index dfcc22a7427..996170ba0a3 100644 --- a/python/core/conversions.sip +++ b/python/core/conversions.sip @@ -1490,8 +1490,6 @@ template <TYPE> %End %ConvertToTypeCode - PyObject *tobj; - // Check the type if that is all that is required. if (sipIsErr == NULL) { @@ -1500,7 +1498,7 @@ template <TYPE> for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i) { - if (!sipCanConvertToInstance(tobj, sipClass_TYPE, SIP_NOT_NONE)) + if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, SIP_NOT_NONE)) return 0; } @@ -1513,7 +1511,7 @@ template <TYPE> { int state; - TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(tobj, sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); + TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr)); if (*sipIsErr) { diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 149907d38a5..7e6929d17be 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -395,9 +395,10 @@ class QgsVectorLayer : QgsMapLayer /**Changes the specified geometry such that it has no intersections with other * polygon (or multipolygon) geometries in this vector layer * @param geom geometry to modify + * @param ignoreFeatures list of feature ids where intersections should be ignored * @return 0 in case of success */ - int removePolygonIntersections( QgsGeometry* geom ); + int removePolygonIntersections( QgsGeometry* geom, QgsFeatureIds ignoreFeatures = QgsFeatureIds() ); /** Adds topological points for every vertex of the geometry. * @param geom the geometry where each vertex is added to segments of other features diff --git a/src/core/qgsgeometry.h b/src/core/qgsgeometry.h index 70c43070f79..9e976367489 100644 --- a/src/core/qgsgeometry.h +++ b/src/core/qgsgeometry.h @@ -30,6 +30,8 @@ email : morb at ozemail dot com dot au #include "qgspoint.h" #include "qgscoordinatetransform.h" +#include "qgsfeature.h" + #include <QSet> class QgsVectorLayer; @@ -432,10 +434,10 @@ class CORE_EXPORT QgsGeometry * 1 if geometry is not of polygon type, * 2 if avoid intersection would change the geometry type, * 3 other error during intersection removal - * @ignoreFeatures possibility to give a list of features where intersections should be ignored + * @param ignoreFeatures possibility to give a list of features where intersections should be ignored (not available in python bindings) * @note added in 1.5 */ - int avoidIntersections( QMap<QgsVectorLayer*, QSet<qint64> > ignoreFeatures = QMap<QgsVectorLayer*, QSet<qint64> >() ); + int avoidIntersections( QMap<QgsVectorLayer*, QSet<QgsFeatureId> > ignoreFeatures = QMap<QgsVectorLayer*, QSet<QgsFeatureId> >() ); class Error {