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
b74e28aa
Commit
b74e28aa
authored
Apr 15, 2021
by
Jean-Baptiste Mardelle
Browse files
Fix crash on remove space
parent
769b551b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/model/timelinefunctions.cpp
View file @
b74e28aa
...
...
@@ -1885,7 +1885,21 @@ bool TimelineFunctions::requestDeleteBlankAt(const std::shared_ptr<TimelineItemM
if
(
cid
==
-
1
)
{
return
false
;
}
int
start
=
timeline
->
getItemPosition
(
cid
);
int
start
=
-
1
;
if
(
timeline
->
isGroup
(
cid
))
{
std
::
unordered_set
<
int
>
sub
=
timeline
->
m_groups
->
getLeaves
(
cid
);
cid
=
*
sub
.
cbegin
();
int
start
=
timeline
->
getItemPosition
(
cid
);
for
(
int
current_id
:
sub
)
{
int
st
=
timeline
->
getItemPosition
(
current_id
);
if
(
st
<
start
)
{
cid
=
current_id
;
start
=
st
;
}
}
}
else
{
start
=
timeline
->
getItemPosition
(
cid
);
}
// Start undoable command
std
::
function
<
bool
(
void
)
>
undo
=
[]()
{
return
true
;
};
std
::
function
<
bool
(
void
)
>
redo
=
[]()
{
return
true
;
};
...
...
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