| 2399 | } |
| 2400 | |
| 2401 | void |
| 2402 | Bezier::removeKeyframe(double time) |
| 2403 | { |
| 2404 | ///only called on the main-thread |
| 2405 | assert( QThread::currentThread() == qApp->thread() ); |
| 2406 | { |
| 2407 | QMutexLocker l(&itemMutex); |
| 2408 | |
| 2409 | if ( !_imp->hasKeyframeAtTime(false, time) ) { |
| 2410 | return; |
| 2411 | } |
| 2412 | assert( _imp->featherPoints.size() == _imp->points.size() || !useFeatherPoints() ); |
| 2413 | |
| 2414 | bool useFeather = useFeatherPoints(); |
| 2415 | BezierCPs::iterator fp = _imp->featherPoints.begin(); |
| 2416 | for (BezierCPs::iterator it = _imp->points.begin(); it != _imp->points.end(); ++it) { |
| 2417 | (*it)->removeKeyframe(false, time); |
| 2418 | if (useFeather) { |
| 2419 | (*fp)->removeKeyframe(false, time); |
| 2420 | ++fp; |
| 2421 | } |
| 2422 | } |
| 2423 | |
| 2424 | std::map<double, bool>::iterator found = _imp->isClockwiseOriented.find(time); |
| 2425 | if ( found != _imp->isClockwiseOriented.end() ) { |
| 2426 | _imp->isClockwiseOriented.erase(found); |
| 2427 | } |
| 2428 | |
| 2429 | copyInternalPointsToGuiPoints(); |
| 2430 | } |
| 2431 | |
| 2432 | incrementNodesAge(); |
| 2433 | getContext()->evaluateChange(); |
| 2434 | Q_EMIT keyframeRemoved(time); |
| 2435 | } |
| 2436 | |
| 2437 | void |
| 2438 | Bezier::removeAnimation() |
no test coverage detected