A GraphicsItem should not call itself show() and hide()

This commit is contained in:
Andreas Fabri 2010-08-12 13:46:50 +00:00
parent c40a4eb1f1
commit 622eb3ce67
1 changed files with 0 additions and 8 deletions

View File

@ -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();
} }