From 0010df67e64bb45e621cdffe85e14569e6d54bb8 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 16 Feb 2021 08:57:47 +0100 Subject: [PATCH] Remove useless if. --- GraphicsView/include/CGAL/Qt/camera_impl.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/GraphicsView/include/CGAL/Qt/camera_impl.h b/GraphicsView/include/CGAL/Qt/camera_impl.h index 709409f1609..971ae6b1de9 100644 --- a/GraphicsView/include/CGAL/Qt/camera_impl.h +++ b/GraphicsView/include/CGAL/Qt/camera_impl.h @@ -885,11 +885,8 @@ CGAL_INLINE_FUNCTION Vec Camera::pointUnderPixel(const QPoint &pixel, bool &found) const { float depth = 2.0; // Qt uses upper corner for its origin while GL uses the lower corner. - if(parent()) - { dynamic_cast(parent())->glReadPixels(pixel.x(), screenHeight() - 1 - pixel.y(), 1, 1, GL_DEPTH_COMPONENT, GL_FLOAT, &depth); - } found = depth < 1.0; Vec point(pixel.x(), pixel.y(), depth); point = unprojectedCoordinatesOf(point);