src/tools/drawtool.cpp

changeset 164
8305e2f968fb
parent 163
36ea1a8aee33
child 168
24590af32ad6
--- a/src/tools/drawtool.cpp	Sat Mar 05 13:32:58 2022 +0200
+++ b/src/tools/drawtool.cpp	Sat Mar 05 13:38:22 2022 +0200
@@ -116,7 +116,14 @@
 {
 	painter->setBrush(this->isconcave ? ::badPolygonBrush : ::polygonBrush);
 	painter->setPen(::polygonPen);
-	canvas->drawWorldPolygon(painter, this->previewPolygon);
+	if (this->previewPolygon.size() > 2)
+	{
+		canvas->drawWorldPolygon(painter, this->previewPolygon);
+	}
+	else
+	{
+		canvas->drawWorldPolyline(painter, this->previewPolygon);
+	}
 	painter->setBrush(::pointBrush);
 	painter->setPen(::pointPen);
 	for (const glm::vec3& point : this->polygon)

mercurial