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
a12b054f
Commit
a12b054f
authored
Dec 15, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix crash on locked subtitle select/move
parent
94c148c6
Pipeline
#44236
passed with stage
in 10 minutes and 2 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinemodel.cpp
View file @
a12b054f
...
...
@@ -1158,7 +1158,7 @@ int TimelineModel::suggestSubtitleMove(int subId, int position, int cursorPositi
Q_ASSERT
(
isSubTitle
(
subId
));
int
currentPos
=
getSubtitlePosition
(
subId
);
int
offset
=
0
;
if
(
currentPos
==
position
)
{
if
(
currentPos
==
position
||
m_subtitleModel
->
isLocked
()
)
{
return
position
;
}
int
newPos
=
position
;
...
...
@@ -2157,6 +2157,11 @@ bool TimelineModel::requestGroupMove(int itemId, int groupId, int delta_track, i
sorted_subtitles
.
push_back
({
affectedItemId
,
m_allSubtitles
.
at
(
affectedItemId
)});
}
}
if
(
!
sorted_subtitles
.
empty
()
&&
m_subtitleModel
->
isLocked
())
{
// Group with a locked subtitle, abort
return
false
;
}
// Sort clips first
std
::
sort
(
sorted_clips
.
begin
(),
sorted_clips
.
end
(),
[
delta_pos
](
const
std
::
pair
<
int
,
int
>
&
clipId1
,
const
std
::
pair
<
int
,
int
>
&
clipId2
)
{
...
...
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