Skip to content
GitLab
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
6d99ae0c
Commit
6d99ae0c
authored
Jan 27, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix crash on undo speed change
parent
d75a00ba
Pipeline
#13943
passed with stage
in 14 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/clipmodel.cpp
View file @
6d99ae0c
...
...
@@ -203,7 +203,7 @@ bool ClipModel::requestResize(int size, bool right, Fun &undo, Fun &redo, bool l
}
else
{
roles
.
push_back
(
TimelineModel
::
OutPointRole
);
}
Fun
operation
=
[
this
,
inPoint
,
outPoint
,
roles
,
track_operation
]()
{
if
(
track_operation
())
{
setInOut
(
inPoint
,
outPoint
);
...
...
@@ -512,9 +512,11 @@ Fun ClipModel::useTimewarpProducer_lambda(double speed)
return
[
speed
,
this
]()
{
qDebug
()
<<
"timeWarp producer"
<<
speed
;
refreshProducerFromBin
(
m_currentTrackId
,
m_currentState
,
speed
);
if
(
auto
ptr
=
m_parent
.
lock
())
{
QModelIndex
ix
=
ptr
->
makeClipIndexFromID
(
m_id
);
ptr
->
notifyChange
(
ix
,
ix
,
TimelineModel
::
SpeedRole
);
if
(
m_currentTrackId
>
-
1
)
{
if
(
auto
ptr
=
m_parent
.
lock
())
{
QModelIndex
ix
=
ptr
->
makeClipIndexFromID
(
m_id
);
ptr
->
notifyChange
(
ix
,
ix
,
TimelineModel
::
SpeedRole
);
}
}
return
true
;
};
...
...
src/timeline2/model/timelinemodel.cpp
View file @
6d99ae0c
...
...
@@ -1904,7 +1904,7 @@ int TimelineModel::requestClipResizeAndTimeWarp(int itemId, int size, bool right
pos
+=
getItemPlaytime
(
id
)
-
size
;
}
result
=
getTrackById
(
tid
)
->
requestClipDeletion
(
id
,
true
,
true
,
undo
,
redo
,
false
,
true
);
result
=
result
&&
requestClipTimeWarp
(
id
,
speed
,
fals
e
,
undo
,
redo
);
result
=
result
&&
requestClipTimeWarp
(
id
,
speed
,
tru
e
,
undo
,
redo
);
result
=
result
&&
requestItemResize
(
id
,
size
,
true
,
true
,
undo
,
redo
);
result
=
result
&&
getTrackById
(
tid
)
->
requestClipInsertion
(
id
,
pos
,
true
,
true
,
undo
,
redo
);
if
(
!
result
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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