Skip to content

Commit 29fe9cc

Browse files
elpasonyalldawson
authored andcommittedSep 14, 2018
Add in-place support
1 parent b6f1634 commit 29fe9cc

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎src/analysis/processing/qgsalgorithmclip.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ QgsClipAlgorithm *QgsClipAlgorithm::createInstance() const
7676
return new QgsClipAlgorithm();
7777
}
7878

79+
bool QgsClipAlgorithm::supportInPlaceEdit( const QgsVectorLayer *layer ) const
80+
{
81+
Q_UNUSED( layer );
82+
return true;
83+
}
84+
7985
QVariantMap QgsClipAlgorithm::processAlgorithm( const QVariantMap &parameters, QgsProcessingContext &context, QgsProcessingFeedback *feedback )
8086
{
8187
std::unique_ptr< QgsFeatureSource > featureSource( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
@@ -141,7 +147,6 @@ QVariantMap QgsClipAlgorithm::processAlgorithm( const QVariantMap &parameters, Q
141147
{
142148
break;
143149
}
144-
145150
QgsFeatureIterator inputIt = featureSource->getFeatures( QgsFeatureRequest().setFilterRect( clipGeom.boundingBox() ) );
146151
QgsFeatureList inputFeatures;
147152
QgsFeature f;

‎src/analysis/processing/qgsalgorithmclip.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ class QgsClipAlgorithm : public QgsProcessingAlgorithm
4444
QString groupId() const override;
4545
QString shortHelpString() const override;
4646
QgsClipAlgorithm *createInstance() const override SIP_FACTORY;
47+
bool supportInPlaceEdit( const QgsVectorLayer *layer ) const override;
4748

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

0 commit comments

Comments
 (0)
Please sign in to comment.