serializer: bypass bezier adj on keyframe type set
This commit is contained in:
@@ -99,7 +99,7 @@ const NodeKeyframe::Type &NodeKeyframe::type() const
|
||||
void NodeKeyframe::set_type(const NodeKeyframe::Type &type)
|
||||
{
|
||||
if (type_ != type) {
|
||||
type_ = type;
|
||||
set_type_no_bezier_adj(type);
|
||||
|
||||
if (type_ == kBezier) {
|
||||
// Set some sane defaults if this keyframe existed in the track and was just changed
|
||||
@@ -120,11 +120,15 @@ void NodeKeyframe::set_type(const NodeKeyframe::Type &type)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
emit TypeChanged(type_);
|
||||
}
|
||||
}
|
||||
|
||||
void NodeKeyframe::set_type_no_bezier_adj(const Type &type)
|
||||
{
|
||||
type_ = type;
|
||||
emit TypeChanged(type_);
|
||||
}
|
||||
|
||||
const QPointF &NodeKeyframe::bezier_control_in() const
|
||||
{
|
||||
return bezier_control_in_;
|
||||
|
||||
@@ -98,6 +98,7 @@ public:
|
||||
*/
|
||||
const Type& type() const;
|
||||
void set_type(const Type& type);
|
||||
void set_type_no_bezier_adj(const Type& type);
|
||||
|
||||
/**
|
||||
* @brief For bezier interpolation, the control point leading into this keyframe
|
||||
|
||||
@@ -865,7 +865,7 @@ void ProjectSerializer220403::LoadKeyframe(QXmlStreamReader *reader, NodeKeyfram
|
||||
} else if (attr.name() == QStringLiteral("time")) {
|
||||
key->set_time(rational::fromString(attr.value().toString()));
|
||||
} else if (attr.name() == QStringLiteral("type")) {
|
||||
key->set_type(static_cast<NodeKeyframe::Type>(attr.value().toInt()));
|
||||
key->set_type_no_bezier_adj(static_cast<NodeKeyframe::Type>(attr.value().toInt()));
|
||||
} else if (attr.name() == QStringLiteral("inhandlex")) {
|
||||
key_in_handle.setX(attr.value().toDouble());
|
||||
} else if (attr.name() == QStringLiteral("inhandley")) {
|
||||
|
||||
Reference in New Issue
Block a user