Commit c5c30bd2 authored by Claudio Valerio's avatar Claudio Valerio

thx to Didier for the fix on compass

parent a6cf83b7
......@@ -680,6 +680,7 @@ void UBGraphicsScene::drawArcTo(const QPointF& pCenterPoint, qreal pSpanAngle)
penWidth /= UBApplication::boardController->currentZoom();
mArcPolygonItem = arcToPolygonItem(QLineF(pCenterPoint, mPreviousPoint), pSpanAngle, penWidth);
mArcPolygonItem->setStroke(mCurrentStroke);
mAddedItems.insert(mArcPolygonItem);
addItem(mArcPolygonItem);
......@@ -2001,3 +2002,7 @@ void UBGraphicsScene::setToolCursor(int tool)
hideEraser();
}
}
void UBGraphicsScene::initStroke(){
mCurrentStroke = new UBGraphicsStroke();
}
......@@ -271,6 +271,8 @@ class UBGraphicsScene: public UBCoreGraphicsScene, public UBItem
return mPreviousPoint;
}
void initStroke();
public slots:
void hideEraser();
......
......@@ -192,6 +192,7 @@ void UBGraphicsCompass::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
mSpanAngleInDegrees = 0;
mSceneArcStartPoint = mapToScene(pencilPosition());
scene()->initStroke();
scene()->moveTo(mSceneArcStartPoint);
}
......
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