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
d08c6d83
Commit
d08c6d83
authored
Mar 05, 2022
by
Jean-Baptiste Mardelle
Browse files
Don't allow creating keyframe outside clip after resizing
parent
38785160
Pipeline
#145560
passed with stage
in 9 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/assets/view/widgets/keyframewidget.cpp
View file @
d08c6d83
...
...
@@ -461,11 +461,21 @@ void KeyframeWidget::slotRefresh()
int
duration
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
ParentDurationRole
).
toInt
(
&
ok
);
Q_ASSERT
(
ok
);
int
in
=
m_model
->
data
(
m_index
,
AssetParameterModel
::
InRole
).
toInt
(
&
ok
);
int
out
=
in
+
duration
;
// m_model->dataChanged(QModelIndex(), QModelIndex());
//->getKeyframeModel()->getKeyModel(m_index)->dataChanged(QModelIndex(), QModelIndex());
m_keyframeview
->
setDuration
(
duration
,
in
);
m_time
->
setRange
(
0
,
duration
-
1
);
m_time
->
setOffset
(
in
);
int
pos
=
m_time
->
getValue
();
bool
isInRange
=
pos
>=
in
&&
pos
<
out
;
connectMonitor
(
isInRange
&&
m_model
->
isActive
());
m_addDeleteAction
->
setEnabled
(
isInRange
&&
pos
>
in
);
int
framePos
=
qBound
(
in
,
pos
,
out
)
-
in
;
if
(
isInRange
&&
framePos
!=
m_time
->
getValue
())
{
slotSetPosition
(
framePos
,
false
);
}
slotRefreshParams
();
}
...
...
Write
Preview
Markdown
is supported
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