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
dbf9e4e6
Commit
dbf9e4e6
authored
Feb 28, 2022
by
Julius Künzel
Browse files
[Effect Keyframes] Fix "apply current value" uses wrong position
parent
db588a07
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/assets/keyframes/model/keyframemodellist.cpp
View file @
dbf9e4e6
...
...
@@ -397,6 +397,13 @@ QVariant KeyframeModelList::getInterpolatedValue(int pos, const QPersistentModel
return
m_parameters
.
at
(
index
)
->
getInterpolatedValue
(
pos
);
}
QVariant
KeyframeModelList
::
getInterpolatedValue
(
const
GenTime
&
pos
,
const
QPersistentModelIndex
&
index
)
const
{
READ_LOCK
();
Q_ASSERT
(
m_parameters
.
count
(
index
)
>
0
);
return
m_parameters
.
at
(
index
)
->
getInterpolatedValue
(
pos
);
}
KeyframeModel
*
KeyframeModelList
::
getKeyModel
()
{
if
(
m_inTimelineIndex
.
isValid
())
{
...
...
src/assets/keyframes/model/keyframemodellist.hpp
View file @
dbf9e4e6
...
...
@@ -115,6 +115,11 @@ public:
@param pos is the position where we interpolate
@param index is the index of the queried parameter. */
QVariant
getInterpolatedValue
(
int
pos
,
const
QPersistentModelIndex
&
index
)
const
;
/** @brief Return the interpolated value of a parameter.
@param pos is the position where we interpolate
@param index is the index of the queried parameter. */
QVariant
getInterpolatedValue
(
const
GenTime
&
pos
,
const
QPersistentModelIndex
&
index
)
const
;
/** @brief Load keyframes from the current parameter value. */
void
refresh
();
...
...
src/assets/keyframes/view/keyframeview.cpp
View file @
dbf9e4e6
...
...
@@ -810,7 +810,7 @@ void KeyframeView::copyCurrentValue(QModelIndex ix, const QString paramName)
auto
*
parentCommand
=
new
QUndoCommand
();
bool
multiParams
=
paramName
.
contains
(
QLatin1Char
(
' '
));
for
(
int
&
kfrIx
:
m_model
->
selectedKeyframes
())
{
QString
oldValue
=
m_model
->
getInterpolatedValue
(
kfrIx
,
ix
).
toString
();
QString
oldValue
=
m_model
->
getInterpolatedValue
(
m_model
->
getPosAtIndex
(
kfrIx
)
,
ix
).
toString
();
QStringList
oldVals
=
oldValue
.
split
(
QLatin1Char
(
' '
));
bool
found
=
false
;
if
(
paramName
.
contains
(
QLatin1String
(
"spinX"
)))
{
...
...
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