From f716cc02605da50af6e2fcfec0162deef954d9a4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 6 Mar 2024 10:25:30 +0100 Subject: [PATCH] fix a bug with devicePixelRatio and picking --- GraphicsView/include/CGAL/Qt/qglviewer_impl.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index 3cca531c5fb..7387b1f4874 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -1047,6 +1047,9 @@ static QString mouseButtonsString(::Qt::MouseButtons b) { CGAL_INLINE_FUNCTION void CGAL::QGLViewer::performClickAction(qglviewer::ClickAction ca, const QMouseEvent *const e) { + // the following call is needed to update the pixel ratio + camera()->setScreenWidthAndHeight(this->width(), this->height(), this->devicePixelRatio()); + // Note: action that need it should call update(). switch (ca) { // # CONNECTION setMouseBinding prevents adding NO_CLICK_ACTION in