Fix GenTime fps not updated on profile change causing different positions to be considered equal.

Fixes #126
parent 8028cdcb
Pipeline #2246 passed with stage
in 18 minutes and 58 seconds
......@@ -205,9 +205,11 @@ bool KeyframeModel::moveKeyframe(GenTime oldPos, GenTime pos, QVariant newVal, F
}
return updateKeyframe(pos, realValue);
}
if (oldPos != pos && hasKeyframe(pos)) {
return false;
}
KeyframeType oldType = m_keyframeList[oldPos].first;
QVariant oldValue = m_keyframeList[oldPos].second;
if (oldPos != pos && hasKeyframe(pos)) return false;
Fun local_undo = []() { return true; };
Fun local_redo = []() { return true; };
qDebug() << getAnimProperty();
......
......@@ -98,8 +98,8 @@ public:
@param pos defines the new position of the keyframe, relative to the clip
@param logUndo if true, then an undo object is created
*/
Q_INVOKABLE bool moveKeyframe(int oldPos, int pos, bool logUndo);
Q_INVOKABLE bool offsetKeyframes(int oldPos, int pos, bool logUndo);
bool moveKeyframe(int oldPos, int pos, bool logUndo);
bool offsetKeyframes(int oldPos, int pos, bool logUndo);
bool moveKeyframe(GenTime oldPos, GenTime pos, QVariant newVal, bool logUndo);
bool moveKeyframe(GenTime oldPos, GenTime pos, QVariant newVal, Fun &undo, Fun &redo);
......
......@@ -293,6 +293,7 @@ bool Core::setCurrentProfile(const QString &profilePath)
m_currentProfile = profilePath;
m_thumbProfile.reset();
// inform render widget
profileChanged();
m_mainWindow->updateRenderWidgetProfile();
if (m_guiConstructed && m_mainWindow->getCurrentTimeline()->controller()->getModel()) {
m_mainWindow->getCurrentTimeline()->controller()->getModel()->updateProfile(&getCurrentProfile()->profile());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment