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
19ac05a9
Commit
19ac05a9
authored
Sep 07, 2021
by
Julius Künzel
💬
Browse files
Fix crash when dropping audio/video only from monitor to bin
parent
f5b900f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/bin/projectitemmodel.cpp
View file @
19ac05a9
...
...
@@ -206,14 +206,18 @@ bool ProjectItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action
// subclip zone
QStringList
clipData
=
ids
.
constFirst
().
split
(
QLatin1Char
(
'/'
));
if
(
clipData
.
length
()
>=
3
)
{
QString
id
;
std
::
shared_ptr
<
ProjectClip
>
masterClip
=
getClipByBinID
(
clipData
.
at
(
0
));
QString
bid
=
clipData
.
at
(
0
);
if
(
bid
.
startsWith
(
QLatin1Char
(
'A'
))
||
bid
.
startsWith
(
QLatin1Char
(
'V'
)))
{
bid
.
remove
(
0
,
1
);
}
std
::
shared_ptr
<
ProjectClip
>
masterClip
=
getClipByBinID
(
bid
);
std
::
shared_ptr
<
ProjectSubClip
>
sub
=
masterClip
->
getSubClip
(
clipData
.
at
(
1
).
toInt
(),
clipData
.
at
(
2
).
toInt
());
if
(
sub
!=
nullptr
)
{
// This zone already exists
return
false
;
}
return
requestAddBinSubClip
(
id
,
clipData
.
at
(
1
).
toInt
(),
clipData
.
at
(
2
).
toInt
(),
{},
clipData
.
at
(
0
));
QString
id
;
return
requestAddBinSubClip
(
id
,
clipData
.
at
(
1
).
toInt
(),
clipData
.
at
(
2
).
toInt
(),
{},
bid
);
}
else
{
// error, malformed clip zone, abort
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