fixes 0003130: FreeCAD 0.17 Qt5 bugs with external display
This commit is contained in:
@@ -1195,11 +1195,17 @@ bool ViewProviderSketch::mouseMove(const SbVec2s &cursorPos, Gui::View3DInventor
|
||||
return true;
|
||||
}
|
||||
case STATUS_SKETCH_UseRubberBand: {
|
||||
// Here we must use the device-pixel-ratio to compute the correct y coordinate (#0003130)
|
||||
#if QT_VERSION >= 0x050000
|
||||
qreal dpr = viewer->getGLWidget()->devicePixelRatioF();
|
||||
#else
|
||||
qreal dpr = 1;
|
||||
#endif
|
||||
newCursorPos = cursorPos;
|
||||
rubberband->setCoords(prvCursorPos.getValue()[0],
|
||||
viewer->getGLWidget()->height() - prvCursorPos.getValue()[1],
|
||||
viewer->getGLWidget()->height()*dpr - prvCursorPos.getValue()[1],
|
||||
newCursorPos.getValue()[0],
|
||||
viewer->getGLWidget()->height() - newCursorPos.getValue()[1]);
|
||||
viewer->getGLWidget()->height()*dpr - newCursorPos.getValue()[1]);
|
||||
viewer->redraw();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user