mirror of https://github.com/CGAL/cgal
A GraphicsItem should not call itself show() and hide()
This commit is contained in:
parent
c40a4eb1f1
commit
622eb3ce67
|
|
@ -114,9 +114,6 @@ PolygonGraphicsItem<P>::PolygonGraphicsItem(P * p_)
|
||||||
draw_edges(true), draw_vertices(true)
|
draw_edges(true), draw_vertices(true)
|
||||||
{
|
{
|
||||||
setVerticesPen(QPen(::Qt::red, 3.));
|
setVerticesPen(QPen(::Qt::red, 3.));
|
||||||
if(poly->size() == 0){
|
|
||||||
this->hide();
|
|
||||||
}
|
|
||||||
updateBoundingBox();
|
updateBoundingBox();
|
||||||
setZValue(3);
|
setZValue(3);
|
||||||
}
|
}
|
||||||
|
|
@ -181,11 +178,6 @@ template <typename P>
|
||||||
void
|
void
|
||||||
PolygonGraphicsItem<P>::modelChanged()
|
PolygonGraphicsItem<P>::modelChanged()
|
||||||
{
|
{
|
||||||
if((poly->size() == 0) ){
|
|
||||||
this->hide();
|
|
||||||
} else if((poly->size() > 0) && (! this->isVisible())){
|
|
||||||
this->show();
|
|
||||||
}
|
|
||||||
updateBoundingBox();
|
updateBoundingBox();
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue