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
dc44dc3c
Commit
dc44dc3c
authored
Apr 08, 2020
by
Jean-Baptiste Mardelle
Browse files
Fix dragging bin clip zone onto itself creates duplicate, and 1 frame offset in zones.
Related to
#287
parent
50d1e578
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/bin/projectclip.h
View file @
dc44dc3c
...
...
@@ -98,7 +98,7 @@ public:
/** @brief Returns the clip type as defined in definitions.h */
ClipType
::
ProducerType
clipType
()
const
override
;
/** @brief Set rating on item */
void
setRating
(
uint
rating
)
override
;
...
...
src/bin/projectitemmodel.cpp
View file @
dc44dc3c
...
...
@@ -201,6 +201,12 @@ bool ProjectItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action
QStringList
clipData
=
ids
.
constFirst
().
split
(
QLatin1Char
(
'/'
));
if
(
clipData
.
length
()
>=
3
)
{
QString
id
;
std
::
shared_ptr
<
ProjectClip
>
masterClip
=
getClipByBinID
(
clipData
.
at
(
0
));
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
));
}
else
{
// error, malformed clip zone, abort
...
...
@@ -213,7 +219,7 @@ bool ProjectItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action
}
if
(
data
->
hasFormat
(
QStringLiteral
(
"kdenlive/effect"
)))
{
// Dropping effect on a Bin item
// Dropping effect on a Bin item
QStringList
effectData
;
effectData
<<
QString
::
fromUtf8
(
data
->
data
(
QStringLiteral
(
"kdenlive/effect"
)));
QStringList
source
=
QString
::
fromUtf8
(
data
->
data
(
QStringLiteral
(
"kdenlive/effectsource"
))).
split
(
QLatin1Char
(
'-'
));
...
...
src/monitor/monitor.cpp
View file @
dc44dc3c
...
...
@@ -1425,7 +1425,7 @@ void Monitor::slotOpenClip(const std::shared_ptr<ProjectClip> &controller, int i
if
(
out
==
-
1
)
{
m_glMonitor
->
getControllerProxy
()
->
setZone
(
m_controller
->
zone
(),
false
);
}
else
{
m_glMonitor
->
getControllerProxy
()
->
setZone
(
in
,
out
,
false
);
m_glMonitor
->
getControllerProxy
()
->
setZone
(
in
,
out
+
1
,
false
);
}
m_snaps
->
addPoint
((
int
)
m_controller
->
frameDuration
()
-
1
);
// Loading new clip / zone, stop if playing
...
...
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