diff --git a/Packages/Qt_widget/demo/Qt_widget/Convex_Hull_2/Qt_widget_move_list_point.h b/Packages/Qt_widget/demo/Qt_widget/Convex_Hull_2/Qt_widget_move_list_point.h index 765ffbcb908..67a0d9bc19a 100644 --- a/Packages/Qt_widget/demo/Qt_widget/Convex_Hull_2/Qt_widget_move_list_point.h +++ b/Packages/Qt_widget/demo/Qt_widget/Convex_Hull_2/Qt_widget_move_list_point.h @@ -53,14 +53,14 @@ class Qt_widget_move_list_point : public Qt_widget_movepoint_helper public: typedef typename R::Point_2 Point; typedef typename R::FT FT; - bool on_first, //if the user choosed something from the popup - wasrepainted;//true when the widget was repainted - Point old_point, //the last point stored in the list - current_v; //the current point - QPopupMenu *popup1; - QCursor cursor; - std::list* l_of_p; - bool first_time; + bool on_first, //if the user choosed something from the popup + wasrepainted;//true when the widget was repainted + Point old_point, //the last point stored in the list + current_v; //the current point + QPopupMenu *popup1; + QCursor cursor; + std::list* l_of_p; + bool first_time; //constructor Qt_widget_move_list_point(const QCursor c=QCursor(Qt::crossCursor)) : @@ -86,15 +86,18 @@ private: { if(l_of_p->empty()) QMessageBox::warning( widget, "There are no points in the list!", - "Generate some points first or add it with the input tool before using this tool!"); + "Generate some points first or add it with the + input tool before using this tool!"); else{ FT x=static_cast(widget->x_real(e->x())); - FT y=static_cast(widget->y_real(e->y())); + FT y=static_cast(widget->y_real(e->y())); Point p(x, y); - Point closest_p; //this point is the closest one to the mouse coordinates + Point closest_p; + //this point is the closest one to the mouse coordinates FT min_dist; std::list::const_iterator it = l_of_p->begin(); min_dist = squared_distance(p, (*it)); + closest_p = (*it); while(it!=l_of_p->end()) { if (min_dist > squared_distance(p, (*it))) @@ -129,7 +132,8 @@ private: x=static_cast(widget->x_real(e->x())), y=static_cast(widget->y_real(e->y())); - *widget << CGAL::GREEN << CGAL::PointSize (5) << CGAL::PointStyle (CGAL::DISC); + *widget << CGAL::GREEN << CGAL::PointSize (5) + << CGAL::PointStyle (CGAL::DISC); if(!wasrepainted) *widget << old_point; *widget << Point(x, y);