summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/drawer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/datavisualization/engine/drawer.cpp')
-rw-r--r--src/datavisualization/engine/drawer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/datavisualization/engine/drawer.cpp b/src/datavisualization/engine/drawer.cpp
index 35623c99..9d50186d 100644
--- a/src/datavisualization/engine/drawer.cpp
+++ b/src/datavisualization/engine/drawer.cpp
@@ -316,9 +316,10 @@ void Drawer::drawLabel(const AbstractRenderItem &item, const LabelItem &labelIte
if (useDepth && !rotateAlong) {
qreal yComp = qreal(qRadiansToDegrees(qTan(positionComp.y() / cameraDistance)));
// Apply negative camera rotations to keep labels facing camera
- QPointF camRotations = camera->rotations();
- modelMatrix.rotate(-camRotations.x(), 0.0f, 1.0f, 0.0f);
- modelMatrix.rotate(-camRotations.y() - yComp, 1.0f, 0.0f, 0.0f);
+ qreal camRotationX = camera->xRotation();
+ qreal camRotationY = camera->yRotation();
+ modelMatrix.rotate(-camRotationX, 0.0f, 1.0f, 0.0f);
+ modelMatrix.rotate(-camRotationY - yComp, 1.0f, 0.0f, 0.0f);
}
// Scale label based on text size