diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index abf7e74547..6b26c3bd47 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -3998,8 +3998,10 @@ void StdCmdClarifySelection::activated(int iMsg) } else { QPoint pos = QCursor::pos(); QPoint local = widget->mapFromGlobal(pos); - point = SbVec2s(static_cast(local.x()), - static_cast(widget->height() - local.y() - 1)); + + qreal devicePixelRatio = widget->devicePixelRatioF(); + point = SbVec2s(static_cast(local.x() * devicePixelRatio), + static_cast((widget->height() - local.y() - 1) * devicePixelRatio)); } // Use ray picking to get all objects under cursor @@ -4071,7 +4073,11 @@ void StdCmdClarifySelection::activated(int iMsg) QPoint globalPos; if (storedPosition.has_value()) { - globalPos = widget->mapToGlobal(QPoint(point[0], widget->height() - point[1] - 1)); + qreal devicePixelRatio = widget->devicePixelRatioF(); + int logicalHeight = static_cast(widget->height()); + QPoint localPos(static_cast(point[0] / devicePixelRatio), + logicalHeight - static_cast(point[1] / devicePixelRatio) - 1); + globalPos = widget->mapToGlobal(localPos); } else { globalPos = QCursor::pos(); }