Skip to content
Permalink
Browse files

Boundary alg requires geometry for in-place edits

  • Loading branch information
nyalldawson committed Sep 21, 2018
1 parent df657d4 commit a764b4bd932b45a8615c78ace25b234206894177
Showing with 11 additions and 0 deletions.
  1. +10 −0 src/analysis/processing/qgsalgorithmboundary.cpp
  2. +1 −0 src/analysis/processing/qgsalgorithmboundary.h
@@ -16,6 +16,7 @@
***************************************************************************/

#include "qgsalgorithmboundary.h"
#include "qgsvectorlayer.h"

///@cond PRIVATE

@@ -62,6 +63,15 @@ QList<int> QgsBoundaryAlgorithm::inputLayerTypes() const
return QList<int>() << QgsProcessing::TypeVectorLine << QgsProcessing::TypeVectorPolygon;
}

bool QgsBoundaryAlgorithm::supportInPlaceEdit( const QgsMapLayer *l ) const
{
const QgsVectorLayer *layer = qobject_cast< const QgsVectorLayer * >( l );
if ( !layer )
return false;

return layer->isSpatial();
}

QgsBoundaryAlgorithm *QgsBoundaryAlgorithm::createInstance() const
{
return new QgsBoundaryAlgorithm();
@@ -41,6 +41,7 @@ class QgsBoundaryAlgorithm : public QgsProcessingFeatureBasedAlgorithm
QString groupId() const override;
QString shortHelpString() const override;
QList<int> inputLayerTypes() const override;
bool supportInPlaceEdit( const QgsMapLayer *layer ) const override;
QgsBoundaryAlgorithm *createInstance() const override SIP_FACTORY;

protected:

0 comments on commit a764b4b

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