mirror of https://github.com/CGAL/cgal
only create a polyline item if the intersection is not empty
This commit is contained in:
parent
f8aabdcc36
commit
853006afb0
|
|
@ -209,10 +209,14 @@ void Polyhedron_demo_intersection_plugin::intersection()
|
|||
#endif
|
||||
std::cout << "ok (" << time.elapsed() << " ms)" << std::endl;
|
||||
|
||||
new_item->setColor(Qt::green);
|
||||
new_item->setRenderingMode(Wireframe);
|
||||
scene->addItem(new_item);
|
||||
new_item->invalidateOpenGLBuffers();
|
||||
if (new_item->polylines.empty())
|
||||
delete new_item;
|
||||
else{
|
||||
new_item->setColor(Qt::green);
|
||||
new_item->setRenderingMode(Wireframe);
|
||||
scene->addItem(new_item);
|
||||
new_item->invalidateOpenGLBuffers();
|
||||
}
|
||||
|
||||
QApplication::restoreOverrideCursor();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue