fix a bug with devicePixelRatio and picking

This commit is contained in:
Laurent Rineau 2024-03-06 10:25:30 +01:00
parent d68ef56d8d
commit f716cc0260
1 changed files with 3 additions and 0 deletions

View File

@ -1047,6 +1047,9 @@ static QString mouseButtonsString(::Qt::MouseButtons b) {
CGAL_INLINE_FUNCTION CGAL_INLINE_FUNCTION
void CGAL::QGLViewer::performClickAction(qglviewer::ClickAction ca, const QMouseEvent *const e) { 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(). // Note: action that need it should call update().
switch (ca) { switch (ca) {
// # CONNECTION setMouseBinding prevents adding NO_CLICK_ACTION in // # CONNECTION setMouseBinding prevents adding NO_CLICK_ACTION in