Commit 1b329518 authored by Claudio Valerio's avatar Claudio Valerio

storkes realized using the ruler and the triangle doesn't support pressure

parent 20ca1383
...@@ -447,9 +447,11 @@ UBGraphicsScene* UBGraphicsRuler::scene() const ...@@ -447,9 +447,11 @@ UBGraphicsScene* UBGraphicsRuler::scene() const
void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width)
{ {
Q_UNUSED(width);
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
mStrokeWidth = width; mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth();
qreal y; qreal y;
...@@ -461,7 +463,7 @@ void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width) ...@@ -461,7 +463,7 @@ void UBGraphicsRuler::StartLine(const QPointF& scenePos, qreal width)
else else
{ {
drawLineDirection = 1; drawLineDirection = 1;
y = rect().y() - width /2; y = rect().y() - mStrokeWidth /2;
} }
if (itemPos.x() < rect().x() + sLeftEdgeMargin) if (itemPos.x() < rect().x() + sLeftEdgeMargin)
......
...@@ -854,8 +854,9 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event) ...@@ -854,8 +854,9 @@ void UBGraphicsTriangle::hoverMoveEvent(QGraphicsSceneHoverEvent *event)
} }
void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width) void UBGraphicsTriangle::StartLine(const QPointF &scenePos, qreal width)
{ {
Q_UNUSED(width);
QPointF itemPos = mapFromScene(scenePos); QPointF itemPos = mapFromScene(scenePos);
mStrokeWidth = width; mStrokeWidth = UBDrawingController::drawingController()->currentToolWidth();
qreal y; qreal y;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment