We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d23f82c commit 70e160bCopy full SHA for 70e160b
plotpy/items/shape/polygon.py
@@ -276,8 +276,10 @@ def draw(
276
painter.setBrush(brush)
277
points = self.transform_points(xMap, yMap)
278
if self.ADDITIONNAL_POINTS:
279
- shape_points = points[: -self.ADDITIONNAL_POINTS]
280
- other_points = points[-self.ADDITIONNAL_POINTS :]
+ # Slice indexing is not supported by PySide6, so we convert the `QPolygonF`
+ # object to a list before converting it back to a `QPolygonF` object:
281
+ shape_points = QG.QPolygonF(list(points[: -self.ADDITIONNAL_POINTS]))
282
+ other_points = QG.QPolygonF(list(points[-self.ADDITIONNAL_POINTS :]))
283
else:
284
shape_points = points
285
other_points = []
0 commit comments