Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Kdenlive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
259
Issues
259
List
Boards
Labels
Service Desk
Milestones
Merge Requests
14
Merge Requests
14
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Multimedia
Kdenlive
Commits
d7c68402
Commit
d7c68402
authored
Sep 24, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix av clip mix
parent
0f144df5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
src/timeline2/model/timelinemodel.cpp
src/timeline2/model/timelinemodel.cpp
+1
-1
src/timeline2/model/trackmodel.cpp
src/timeline2/model/trackmodel.cpp
+6
-5
No files found.
src/timeline2/model/timelinemodel.cpp
View file @
d7c68402
...
...
@@ -905,7 +905,7 @@ bool TimelineModel::mixClip(int idToMove)
std
::
unordered_set
<
int
>
sub
=
m_groups
->
getLeaves
(
parentGroup
);
// Perform mix on split clip
for
(
int
current_id
:
sub
)
{
if
(
current_id
==
idToMove
)
{
if
(
idToMove
==
current_id
)
{
continue
;
}
int
splitTrack
=
m_allClips
[
current_id
]
->
getCurrentTrackId
();
...
...
src/timeline2/model/trackmodel.cpp
View file @
d7c68402
...
...
@@ -151,7 +151,7 @@ bool TrackModel::switchPlaylist(int clipId, int position, int sourcePlaylist, in
Fun
TrackModel
::
requestClipInsertion_lambda
(
int
clipId
,
int
position
,
bool
updateView
,
bool
finalMove
,
bool
groupMove
)
{
QWriteLocker
locker
(
&
m_lock
);
qDebug
()
<<
"== PROCESSING INS
RET OF_
: "
<<
clipId
;
qDebug
()
<<
"== PROCESSING INS
ERT OF
: "
<<
clipId
;
// By default, insertion occurs in topmost track
int
target_playlist
=
0
;
if
(
auto
ptr
=
m_parent
.
lock
())
{
...
...
@@ -594,7 +594,7 @@ Fun TrackModel::requestClipResize_lambda(int clipId, int in, int out, bool right
if
(
delta
==
0
)
{
return
[]()
{
return
true
;
};
}
// qDebug() << "RESIZING CLIP: " << clipId << " FROM: " << delta;
// qDebug() << "RESIZING CLIP: " << clipId << " FROM: " << delta
<<", ON PLAYLIST: "<<target_track
;
if
(
delta
>
0
)
{
// we shrink clip
return
[
right
,
target_clip
,
target_track
,
clip_position
,
delta
,
in
,
out
,
clipId
,
update_snaps
,
this
]()
{
if
(
isLocked
())
return
false
;
...
...
@@ -1579,6 +1579,7 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
secondClipCut
=
maxPos
-
secondClipPos
;
}
else
{
// Error, timeline unavailable
qDebug
()
<<
"=== ERROR NO TIMELINE!!!!"
;
return
false
;
}
...
...
@@ -1755,15 +1756,15 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
ptr
->
getClipPtr
(
clipIds
.
second
)
->
setSubPlaylistIndex
(
dest_track
);
}
rearrange_playlists
();
build_mix
();
auto
op
=
requestClipInsertion_lambda
(
clipIds
.
second
,
secondClipPos
,
updateView
,
finalMove
,
groupMove
);
bool
result
=
op
();
if
(
result
)
{
build_mix
();
std
::
function
<
bool
(
void
)
>
local_undo
=
[]()
{
return
true
;
};
std
::
function
<
bool
(
void
)
>
local_redo
=
[]()
{
return
true
;
};
if
(
auto
ptr
=
m_parent
.
lock
())
{
result
=
ptr
->
getClipPtr
(
clipIds
.
second
)
->
requestResize
(
secondClipPos
+
secondClipDuration
-
mixPosition
,
false
,
local_undo
,
local_redo
,
clipHasEndMix
);
result
=
result
&&
ptr
->
getClipPtr
(
clipIds
.
first
)
->
requestResize
(
mixPosition
+
mixDuration
-
firstClipPos
,
true
,
local_undo
,
local_redo
,
fals
e
);
result
=
ptr
->
getClipPtr
(
clipIds
.
second
)
->
requestResize
(
secondClipPos
+
secondClipDuration
-
mixPosition
,
false
,
local_undo
,
local_redo
,
true
,
clipHasEndMix
);
result
=
result
&&
ptr
->
getClipPtr
(
clipIds
.
first
)
->
requestResize
(
mixPosition
+
mixDuration
-
firstClipPos
,
true
,
local_undo
,
local_redo
,
true
,
tru
e
);
QModelIndex
ix
=
ptr
->
makeClipIndexFromID
(
clipIds
.
second
);
emit
ptr
->
dataChanged
(
ix
,
ix
,
{
TimelineModel
::
StartRole
,
TimelineModel
::
MixRole
,
TimelineModel
::
MixCutRole
});
}
...
...
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