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
bc698228
Commit
bc698228
authored
Oct 27, 2020
by
Jean-Baptiste Mardelle
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When moving a clip outside a mix, correctly resize the clip.
Relate to
#796
parent
f6c87416
Pipeline
#38842
passed with stage
in 38 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
28 deletions
+2
-28
src/timeline2/model/timelinemodel.cpp
src/timeline2/model/timelinemodel.cpp
+2
-28
No files found.
src/timeline2/model/timelinemodel.cpp
View file @
bc698228
...
...
@@ -671,17 +671,7 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
if
(
old_trackId
==
trackId
)
{
// We are moving a clip on same track
if
(
finalMove
&&
position
>=
mixData
.
first
.
firstClipInOut
.
second
)
{
int
subPlaylist
=
m_allClips
[
clipId
]
->
getSubPlaylistIndex
();
update_playlist
=
[
this
,
clipId
,
trackId
,
subPlaylist
]()
{
m_allClips
[
clipId
]
->
setSubPlaylistIndex
(
subPlaylist
==
0
?
1
:
0
,
trackId
);
return
true
;
};
bool
isAudio
=
getTrackById_const
(
old_trackId
)
->
isAudioTrack
();
update_playlist_undo
=
[
this
,
clipId
,
subPlaylist
,
old_trackId
,
trackId
,
mixData
,
isAudio
]()
{
m_allClips
[
clipId
]
->
setSubPlaylistIndex
(
subPlaylist
,
trackId
);
bool
result
=
getTrackById_const
(
old_trackId
)
->
createMix
(
mixData
.
first
,
isAudio
);
return
result
;
};
removeMixWithUndo
(
clipId
,
local_undo
,
local_redo
);
}
}
else
if
(
finalMove
)
{
// Clip moved to another track, delete mix
...
...
@@ -710,23 +700,7 @@ bool TimelineModel::requestClipMove(int clipId, int trackId, int position, bool
if
(
old_trackId
==
trackId
)
{
if
(
finalMove
&&
(
position
+
clipDuration
<=
mixData
.
second
.
secondClipInOut
.
first
))
{
// Moved outside mix zone
bool
switchPlaylist
=
!
getTrackById_const
(
trackId
)
->
hasStartMix
(
clipId
);
int
subPlaylist
=
m_allClips
[
mixData
.
second
.
secondClipId
]
->
getSubPlaylistIndex
();
if
(
switchPlaylist
)
{
update_playlist
=
[
this
,
mixData
,
subPlaylist
,
trackId
]()
{
bool
result
=
getTrackById_const
(
trackId
)
->
switchPlaylist
(
mixData
.
second
.
secondClipId
,
mixData
.
second
.
secondClipInOut
.
first
,
subPlaylist
,
0
);
return
result
;
};
}
bool
isAudio
=
getTrackById_const
(
trackId
)
->
isAudioTrack
();
update_playlist_undo
=
[
this
,
mixData
,
subPlaylist
,
trackId
,
isAudio
,
switchPlaylist
]()
{
bool
result
=
true
;
if
(
switchPlaylist
)
{
result
=
getTrackById_const
(
trackId
)
->
switchPlaylist
(
mixData
.
second
.
secondClipId
,
mixData
.
second
.
secondClipInOut
.
first
,
0
,
subPlaylist
);
}
result
=
result
&&
getTrackById_const
(
trackId
)
->
createMix
(
mixData
.
second
,
isAudio
);
return
result
;
};
removeMixWithUndo
(
mixData
.
second
.
secondClipId
,
local_undo
,
local_redo
);
}
}
else
{
// Clip moved to another track, delete mix
...
...
Eugen Mohr
@emohr
·
Oct 27, 2020
Developer
Which issue should this fix/solve?
Edited
Oct 28, 2020
by
Eugen Mohr
Which issue should this fix/solve?
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