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
24b91d02
Commit
24b91d02
authored
Jun 13, 2019
by
Jean-Baptiste Mardelle
Browse files
Fix resize failure leaving clip at wrong size
parent
a438a5c3
Pipeline
#4288
passed with stage
in 14 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/clipmodel.cpp
View file @
24b91d02
...
...
@@ -199,8 +199,8 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
};
if
(
operation
())
{
// Now, we are in the state in which the timeline should be when we try to revert current action. So we can build the reverse action from here
QVector
<
int
>
roles
{
TimelineModel
::
DurationRole
};
if
(
m_currentTrackId
!=
-
1
)
{
QVector
<
int
>
roles
{
TimelineModel
::
DurationRole
};
if
(
!
right
)
{
roles
.
push_back
(
TimelineModel
::
StartRole
);
roles
.
push_back
(
TimelineModel
::
InPointRole
);
...
...
@@ -208,15 +208,16 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
roles
.
push_back
(
TimelineModel
::
OutPointRole
);
}
if
(
auto
ptr
=
m_parent
.
lock
())
{
QModelIndex
ix
=
ptr
->
makeClipIndexFromID
(
m_id
);
// TODO: integrate in undo
ptr
->
dataChanged
(
ix
,
ix
,
roles
);
track_reverse
=
ptr
->
getTrackById
(
m_currentTrackId
)
->
requestClipResize_lambda
(
m_id
,
old_in
,
old_out
,
right
);
}
}
Fun
reverse
=
[
this
,
old_in
,
old_out
,
track_reverse
]()
{
Fun
reverse
=
[
this
,
old_in
,
old_out
,
track_reverse
,
roles
]()
{
if
(
track_reverse
())
{
setInOut
(
old_in
,
old_out
);
if
(
auto
ptr
=
m_parent
.
lock
())
{
QModelIndex
ix
=
ptr
->
makeClipIndexFromID
(
m_id
);
ptr
->
dataChanged
(
ix
,
ix
,
roles
);
}
return
true
;
}
return
false
;
...
...
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