Skip to content
Permalink
Browse files

Add in-place support

  • Loading branch information
elpaso authored and nyalldawson committed Sep 14, 2018
1 parent b6f1634 commit 29fe9cca418667e0856cfdaa42e70cdaa90c19d4
Showing with 7 additions and 1 deletion.
  1. +6 −1 src/analysis/processing/qgsalgorithmclip.cpp
  2. +1 −0 src/analysis/processing/qgsalgorithmclip.h
@@ -76,6 +76,12 @@ QgsClipAlgorithm *QgsClipAlgorithm::createInstance() const
return new QgsClipAlgorithm();
}

bool QgsClipAlgorithm::supportInPlaceEdit( const QgsVectorLayer *layer ) const
{
Q_UNUSED( layer );
return true;
}

QVariantMap QgsClipAlgorithm::processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback )
{
std::unique_ptr< QgsFeatureSource > featureSource( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
@@ -141,7 +147,6 @@ QVariantMap QgsClipAlgorithm::processAlgorithm( const QVariantMap &parameters, Q
{
break;
}

QgsFeatureIterator inputIt = featureSource->getFeatures( QgsFeatureRequest().setFilterRect( clipGeom.boundingBox() ) );
QgsFeatureList inputFeatures;
QgsFeature f;
@@ -44,6 +44,7 @@ class QgsClipAlgorithm : public QgsProcessingAlgorithm
QString groupId() const override;
QString shortHelpString() const override;
QgsClipAlgorithm *createInstance() const override SIP_FACTORY;
bool supportInPlaceEdit( const QgsVectorLayer *layer ) const override;

QgsProcessingAlgorithm::Flags flags() const override;
protected:

0 comments on commit 29fe9cc

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