Skip to content
Permalink
Browse files

Fix some exceptions when running in-place edit on geometry-less layer

  • Loading branch information
nyalldawson committed Sep 21, 2018
1 parent 4b24552 commit df657d4fd303cb82c28df128645450b1a6b4d4a2
@@ -94,8 +94,11 @@ def processFeature(self, feature, context, feedback):
feedback.reportError(self.tr("One or more line ignored due to geometry not having a minimum of three vertices."))
return [feature]

def supportInPlaceEdit(self, layer):
return False

def convertWkbToPolygons(self, wkb):
multi_wkb = None
multi_wkb = QgsWkbTypes.NoGeometry
if QgsWkbTypes.singleType(QgsWkbTypes.flatType(wkb)) == QgsWkbTypes.LineString:
multi_wkb = QgsWkbTypes.MultiPolygon
elif QgsWkbTypes.singleType(QgsWkbTypes.flatType(wkb)) == QgsWkbTypes.CompoundCurve:
@@ -85,8 +85,11 @@ def processFeature(self, feature, context, feedback):
feature.setGeometry(QgsGeometry(self.convertToLines(feature.geometry())))
return [feature]

def supportInPlaceEdit(self, layer):
return False

def convertWkbToLines(self, wkb):
multi_wkb = None
multi_wkb = QgsWkbTypes.NoGeometry
if QgsWkbTypes.singleType(QgsWkbTypes.flatType(wkb)) == QgsWkbTypes.Polygon:
multi_wkb = QgsWkbTypes.MultiLineString
elif QgsWkbTypes.singleType(QgsWkbTypes.flatType(wkb)) == QgsWkbTypes.CurvePolygon:

0 comments on commit df657d4

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