svn path=/trunk/kdenlive/; revision=5230
po.h2 = QPointF(x+0.05, y+0.05);
m_currentPointIndex = m_spline.addPoint(po);
m_currentPointType = PTypeP;
po.h2 = QPointF(x+0.05, y+0.05);
m_currentPointIndex = m_spline.addPoint(po);
m_currentPointType = PTypeP;
- if (m_currentPointIndex == -1) // x already in use
- return;
/*if (!d->jumpOverExistingPoints(newPoint, -1)) return;*/
} else {
m_currentPointIndex = closestPointIndex;
/*if (!d->jumpOverExistingPoints(newPoint, -1)) return;*/
} else {
m_currentPointIndex = closestPointIndex;
keepSorted();
validatePoints();
m_validSpline = false;
keepSorted();
validatePoints();
m_validSpline = false;
- return m_points.indexOf(point);
+ if (m_points.indexOf(point) == -1) {
+ // point changed during validation process
+ for (int i = 0; i < m_points.count(); ++i) {
+ // this condition should be sufficient, too
+ if (m_points.at(i).p == point.p)
+ return i;
+ }
+ } else {
+ return m_points.indexOf(point);
+ }
}
void CubicBezierSpline::setPrecision(int pre)
}
void CubicBezierSpline::setPrecision(int pre)