From 1b3295188b8a0110385f4085bff61ceaccfae474 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Mon, 2 Sep 2013 14:11:24 +0200 Subject: [PATCH] storkes realized using the ruler and the triangle doesn't support pressure --- src/tools/UBGraphicsRuler.cpp | 6 ++++-- src/tools/UBGraphicsTriangle.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/tools/UBGraphicsRuler.cpp b/src/tools/UBGraphicsRuler.cpp index be2871f7..45c50093 100644 --- a/src/tools/UBGraphicsRuler.cpp +++ b/src/tools/UBGraphicsRuler.cpp @@ -447,9 +447,11 @@ UBGraphicsScene* UBGraphicsRuler::scene() const void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) { + Q_UNUSED(width); + QPointF itemPos = mapFromScene(scenePos); - mStrokeWidth = width; + mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth(); qreal y; @@ -461,7 +463,7 @@ void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) else { drawLineDirection = 1; - y = rect().y() - width /2; + y = rect().y() - mStrokeWidth /2; } if (itemPos.x() < rect().x() + sLeftEdgeMargin) diff --git a/src/tools/UBGraphicsTriangle.cpp b/src/tools/UBGraphicsTriangle.cpp index 821420bd..32fd17d1 100644 --- a/src/tools/UBGraphicsTriangle.cpp +++ b/src/tools/UBGraphicsTriangle.cpp @@ -854,8 +854,9 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event) } void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) { + Q_UNUSED(width); QPointF itemPos = mapFromScene(scenePos); - mStrokeWidth = width; + mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth(); qreal y;