Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
db588a07
Commit
db588a07
authored
Feb 28, 2022
by
Julius Künzel
Browse files
[Effect Keyframes] Fix "copy current value to selected" crash
parent
b041e67f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/assets/keyframes/view/keyframeview.cpp
View file @
db588a07
...
...
@@ -809,8 +809,8 @@ void KeyframeView::copyCurrentValue(QModelIndex ix, const QString paramName)
qDebug
()
<<
"=== COPYING VALS: "
<<
val
<<
" AT POS: "
<<
m_position
<<
", PARAM NAME_ "
<<
paramName
;
auto
*
parentCommand
=
new
QUndoCommand
();
bool
multiParams
=
paramName
.
contains
(
QLatin1Char
(
' '
));
for
(
int
&
kf
:
m_model
->
selectedKeyframes
())
{
QString
oldValue
=
m_model
->
getInterpolatedValue
(
kf
,
ix
).
toString
();
for
(
int
&
kf
rIx
:
m_model
->
selectedKeyframes
())
{
QString
oldValue
=
m_model
->
getInterpolatedValue
(
kf
rIx
,
ix
).
toString
();
QStringList
oldVals
=
oldValue
.
split
(
QLatin1Char
(
' '
));
bool
found
=
false
;
if
(
paramName
.
contains
(
QLatin1String
(
"spinX"
)))
{
...
...
@@ -859,7 +859,7 @@ void KeyframeView::copyCurrentValue(QModelIndex ix, const QString paramName)
}
else
if
(
multiParams
)
{
parentCommand
->
setText
(
i18n
(
"Update keyframes value"
));
}
bool
result
=
m_model
->
updateKeyframe
(
GenTime
(
kf
+
offset
,
pCore
->
getCurrentFps
()
),
newVal
,
ix
,
parentCommand
);
bool
result
=
m_model
->
updateKeyframe
(
m_model
->
getPosAtIndex
(
kfrIx
),
newVal
,
ix
,
parentCommand
);
if
(
result
)
{
pCore
->
displayMessage
(
i18n
(
"Keyframe value copied"
),
InformationMessage
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment