Corrected stroke drawing when no interpolation is used (so

UBGraphicsScene::drawCurve can be used either way)
preferencesAboutTextFull
Craig Watson 9 years ago
parent f82a0a32d3
commit b55ab7c92c
  1. 11
      src/domain/UBGraphicsStroke.cpp

@ -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) {

Loading…
Cancel
Save