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
5544a82a
Commit
5544a82a
authored
Jan 10, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix dragging a composition sometimes moved it to the beginning of the clip
parent
c50680f9
Pipeline
#121482
passed with stage
in 7 minutes and 5 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/timeline.qml
View file @
5544a82a
...
...
@@ -587,7 +587,7 @@ Rectangle {
// We want a same track composition
timeline
.
insertNewMix
(
track
,
sameCutPos
,
clipBeingDroppedData
)
}
else
if
(
!
isAudioDrag
)
{
timeline
.
insertNewComposition
(
track
,
frame
,
clipBeingDroppedData
,
true
)
timeline
.
insertNewComposition
AtPos
(
track
,
frame
,
clipBeingDroppedData
)
}
else
{
// Cannot insert an audio mix composition
}
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
5544a82a
...
...
@@ -430,14 +430,9 @@ void TimelineController::insertNewMix(int tid, int position, const QString &tran
}
}
int
TimelineController
::
insertNewComposition
(
int
tid
,
int
position
,
const
QString
&
transitionId
,
bool
logUndo
)
int
TimelineController
::
insertNewComposition
AtPos
(
int
tid
,
int
position
,
const
QString
&
transitionId
)
{
int
clipId
=
m_model
->
getTrackById_const
(
tid
)
->
getClipByPosition
(
position
);
if
(
clipId
>
0
)
{
int
minimum
=
m_model
->
getClipPosition
(
clipId
);
return
insertNewComposition
(
tid
,
clipId
,
position
-
minimum
,
transitionId
,
logUndo
);
}
return
insertComposition
(
tid
,
position
,
transitionId
,
logUndo
);
return
insertComposition
(
tid
,
position
,
transitionId
,
true
);
}
int
TimelineController
::
insertNewComposition
(
int
tid
,
int
clipId
,
int
offset
,
const
QString
&
transitionId
,
bool
logUndo
)
...
...
src/timeline2/view/timelinecontroller.h
View file @
5544a82a
...
...
@@ -241,7 +241,7 @@ public:
@param logUndo if set to false, no undo object is stored
@return the id of the inserted composition
*/
Q_INVOKABLE
int
insertNewComposition
(
int
tid
,
int
position
,
const
QString
&
transitionId
,
bool
logUndo
);
Q_INVOKABLE
int
insertNewComposition
AtPos
(
int
tid
,
int
position
,
const
QString
&
transitionId
);
Q_INVOKABLE
int
insertNewComposition
(
int
tid
,
int
clipId
,
int
offset
,
const
QString
&
transitionId
,
bool
logUndo
);
/** @brief Request deletion of the currently selected clips
...
...
Write
Preview
Markdown
is supported
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