Skip to content

Commit

Permalink
update bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Sep 25, 2012
1 parent efc4cb6 commit ded943d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
6 changes: 2 additions & 4 deletions python/core/conversions.sip
Expand Up @@ -1490,8 +1490,6 @@ template <TYPE>
%End

%ConvertToTypeCode
PyObject *tobj;

// Check the type if that is all that is required.
if (sipIsErr == NULL)
{
Expand All @@ -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;
}

Expand All @@ -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)
{
Expand Down
3 changes: 2 additions & 1 deletion python/core/qgsvectorlayer.sip
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/core/qgsgeometry.h
Expand Up @@ -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;
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit ded943d

Please sign in to comment.