Enable step functions in the curve-editor

... and shut-up an annoying qDebug log in the transition-editor.

Change-Id: Iea8b48e48bb7e52cd4c845f28c49f8a513785fab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Knud Dollereder
2021-03-02 12:26:40 +01:00
parent 60aac50a44
commit 1ba7c149af
4 changed files with 13 additions and 5 deletions

View File

@@ -338,7 +338,8 @@ void CurveEditorView::commitKeyframes(TreeItem *item)
group.setValue(QVariant(pos.y()), pos.x());
if (previous.isValid()) {
if (frame.interpolation() == Keyframe::Interpolation::Bezier) {
if (frame.interpolation() == Keyframe::Interpolation::Bezier ||
frame.interpolation() == Keyframe::Interpolation::Step ) {
CurveSegment segment(previous, frame);
if (segment.isValid())
attachEasingCurve(group, pos.x(), segment.easingCurve());
@@ -346,8 +347,6 @@ void CurveEditorView::commitKeyframes(TreeItem *item)
QVariant data = frame.data();
if (data.type() == static_cast<int>(QMetaType::QEasingCurve))
attachEasingCurve(group, pos.x(), data.value<QEasingCurve>());
} else if (frame.interpolation() == Keyframe::Interpolation::Step) {
// Warning: Keyframe::Interpolation::Step not yet implemented
}
}