From 4fdb182b99c2b33fd6e5a6c64de1f8ea1e6b2d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 8 Jun 2011 09:31:44 +0000 Subject: [PATCH] BUGFIX: Even if a polyline is closed, it needs at least 3 points to be a polygon. --- GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h b/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h index 5ec85826447..9d763cca956 100644 --- a/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h +++ b/GraphicsView/include/CGAL/Qt/GraphicsViewPolylineInput.h @@ -95,7 +95,7 @@ protected: std::list points; Converter convert; convert(points, this->polygon); - if(closed_){ + if(closed_ && points.size()>2){ points.push_back(points.front()); } emit(generate(CGAL::make_object(points)));