When the polyline is closed we duplicate the first point

This commit is contained in:
Andreas Fabri 2008-07-29 20:47:43 +00:00
parent 8457fce8f2
commit 4094ca645b
1 changed files with 4 additions and 1 deletions

View File

@ -51,11 +51,11 @@ protected:
protected:
QPolygonF polygon;
bool closed_;
private:
QGraphicsPathItem *path_item;
QGraphicsLineItem *b, *e;
bool closed_;
int n_;
QPointF sp;
QGraphicsScene *scene_;
@ -75,6 +75,9 @@ protected:
std::list<typename K::Point_2> points;
Converter<K> convert;
convert(points, this->polygon);
if(closed_){
points.push_back(points.front());
}
emit(generate(CGAL::make_object(points)));
}
}; // end class GraphicsViewPolylineInput