Commit b55ab7c9 authored by Craig Watson's avatar Craig Watson

Corrected stroke drawing when no interpolation is used (so

UBGraphicsScene::drawCurve can be used either way)
parent f82a0a32
......@@ -72,10 +72,17 @@ QList<QPointF> UBGraphicsStroke::addPoint(const QPointF& point, UBInterpolator::
{
int n = mDrawnPoints.size();
if (interpolationMethod == UBInterpolator::NoInterpolation || n == 0) {
if (n == 0) {
mDrawnPoints << point;
mAllPoints << point;
return QList<QPointF>() << point;
return QList<QPointF>();
}
if (interpolationMethod == UBInterpolator::NoInterpolation) {
QPointF lastPoint = mDrawnPoints.last();
mDrawnPoints << point;
mAllPoints << point;
return QList<QPointF>() << lastPoint << point;
}
else if (interpolationMethod == UBInterpolator::Bezier) {
......
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