Fix changing keyframe type for multiple keyframes not working (aacd17ed) · Commits · Multimedia / Kdenlive · GitLab
Admin message
Join us at
Akademy
to celebrate KDE's 30th anniversary!
Travel support requests
are open till May 31st.
Register now
Verified
Commit
aacd17ed
authored
Dec 13, 2025
by
Jean-Baptiste Mardelle
Browse files
parent
93957142
Loading
Loading
Loading
Loading
Changes
Pipelines
Loading
Original line number
Diff line number
Diff line
@@ -571,12 +571,10 @@ bool KeyframeModelList::updateMultiKeyframe(GenTime pos, const QStringList &sour
return
true
// NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
bool
KeyframeModelList
::
updateKeyframeType
GenTime
pos
int
type
const
QPersistentModelIndex
index
bool
KeyframeModelList
::
updateKeyframeType
GenTime
pos
int
type
const
QPersistentModelIndex
index
Fun
undo
Fun
redo
QWriteLocker
locker
m_lock
);
Q_ASSERT
m_parameters
count
index
);
Fun
undo
[]()
return
true
};
Fun
redo
[]()
return
true
};
if
singleKeyframe
())
bool
ok
false
Keyframe
kf
m_parameters
begin
()
->
second
->
getNextKeyframe
GenTime
),
ok
);
@@ -587,9 +585,6 @@ bool KeyframeModelList::updateKeyframeType(GenTime pos, int type, const QPersist
for
const
auto
param
m_parameters
res
res
&&
param
second
->
updateKeyframeType
pos
type
undo
redo
);
if
res
PUSH_UNDO
undo
redo
i18n
"Update keyframe"
));
return
res
Original line number
Diff line number
Diff line
@@ -78,7 +78,7 @@ public:
*/
bool
updateMultiKeyframe
GenTime
pos
const
QStringList
sourceValues
const
QStringList
values
const
QList
QModelIndex
indexes
QUndoCommand
parentCommand
nullptr
);
bool
updateKeyframeType
GenTime
pos
int
type
const
QPersistentModelIndex
index
);
bool
updateKeyframeType
GenTime
pos
int
type
const
QPersistentModelIndex
index
Fun
undo
Fun
redo
);
bool
updateKeyframe
GenTime
oldPos
GenTime
pos
const
QVariant
normalizedVal
bool
logUndo
true
);
KeyframeType
::
KeyframeEnum
keyframeType
GenTime
pos
const
/** @brief Returns a keyframe data at given pos
Original line number
Diff line number
Diff line
@@ -147,11 +147,20 @@ const QString KeyframeView::getAssetId()
return
m_model
->
getAssetId
();
void
KeyframeView
::
slotEdit
Type
int
type
const
QPersistentModelIndex
index
void
KeyframeView
::
slotEdit
FramesType
QList
int
frames
int
type
const
QPersistentModelIndex
index
int
offset
m_relative
pCore
->
getItemIn
m_model
->
getOwnerId
());
if
m_model
->
hasKeyframe
m_position
offset
))
m_model
->
updateKeyframeType
GenTime
m_position
offset
pCore
->
getCurrentFps
()),
type
index
);
Fun
undo
[]()
return
true
};
Fun
redo
[]()
return
true
};
bool
updated
false
for
auto
frames
if
m_model
->
hasKeyframe
))
if
m_model
->
updateKeyframeType
GenTime
pCore
->
getCurrentFps
()),
type
index
undo
redo
))
updated
true
if
updated
pCore
->
pushUndo
undo
redo
i18n
"Update keyframe"
));
Original line number
Diff line number
Diff line
@@ -40,7 +40,7 @@ public Q_SLOTS:
void
slotModelDisplayChanged
();
void
slotOnFocus
();
void
slotLoseFocus
();
void
slotEdit
Type
int
type
const
QPersistentModelIndex
index
);
void
slotEdit
FramesType
QList
int
frames
int
type
const
QPersistentModelIndex
index
);
/** @brief Emit initial info for monitor. */
void
initKeyframePos
();
/** @brief Move selected keyframe to cursor position. */
Original line number
Diff line number
Diff line
@@ -471,7 +471,18 @@ void KeyframeContainer::monitorSeek(int pos)
void
KeyframeContainer
::
slotEditKeyframeType
QAction
action
int
type
action
->
data
().
toInt
();
m_keyframeview
->
slotEditType
type
m_index
);
QList
int
frames
if
m_keyframes
->
selectedKeyframes
().
count
()
for
auto
m_keyframes
->
selectedKeyframes
())
frames
<<
m_keyframes
->
getPosAtIndex
).
frames
pCore
->
getCurrentFps
());
else
frames
<<
getPosition
();
if
frames
isEmpty
())
return
m_keyframeview
->
slotEditFramesType
frames
type
m_index
);
m_selectType
->
setIcon
action
->
icon
());
Q_EMIT
activateEffect
();
Loading
US