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
735bf84b
Commit
735bf84b
authored
Oct 23, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some compile warnings
parent
8f43cbb7
Pipeline
#38578
passed with stage
in 26 minutes and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
7 deletions
+33
-7
src/timeline2/model/trackmodel.cpp
src/timeline2/model/trackmodel.cpp
+33
-7
No files found.
src/timeline2/model/trackmodel.cpp
View file @
735bf84b
...
...
@@ -1066,7 +1066,7 @@ bool TrackModel::checkConsistency()
service
.
reset
(
service
->
producer
());
}
}
if
(
mixCount
!=
m_sameCompositions
.
size
()
||
m_sameCompositions
.
size
(
)
!=
m_mixList
.
count
())
{
if
(
mixCount
!=
static_cast
<
int
>
(
m_sameCompositions
.
size
())
||
static_cast
<
int
>
(
m_sameCompositions
.
size
()
)
!=
m_mixList
.
count
())
{
// incoherent mix count
qDebug
()
<<
"=== INCORRECT mix count. Existing: "
<<
mixCount
<<
"; REGISTERED: "
<<
m_mixList
.
count
();
return
false
;
...
...
@@ -1715,6 +1715,12 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
clip
->
setSubPlaylistIndex
(
0
,
m_id
);
int
index
=
m_playlists
[
0
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
0
].
consolidate_blanks
();
if
(
index
==
-
1
)
{
// Something went wrong, abort
m_playlists
[
1
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
1
].
consolidate_blanks
();
return
false
;
}
}
m_playlists
[
1
].
consolidate_blanks
();
}
...
...
@@ -1728,6 +1734,12 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
clip
->
setSubPlaylistIndex
(
1
,
m_id
);
int
index
=
m_playlists
[
1
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
1
].
consolidate_blanks
();
if
(
index
==
-
1
)
{
// Something went wrong, abort
m_playlists
[
0
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
0
].
consolidate_blanks
();
return
false
;
}
}
if
(
m_sameCompositions
.
count
(
i
.
key
())
>
0
)
{
// There is a mix at clip start, adjust direction
...
...
@@ -1764,6 +1776,12 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
clip
->
setSubPlaylistIndex
(
1
,
m_id
);
int
index
=
m_playlists
[
1
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
1
].
consolidate_blanks
();
if
(
index
==
-
1
)
{
// Something went wrong, abort
m_playlists
[
0
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
0
].
consolidate_blanks
();
return
false
;
}
}
m_playlists
[
0
].
consolidate_blanks
();
}
...
...
@@ -1777,6 +1795,12 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
clip
->
setSubPlaylistIndex
(
0
,
m_id
);
int
index
=
m_playlists
[
0
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
0
].
consolidate_blanks
();
if
(
index
==
-
1
)
{
// Something went wrong, abort
m_playlists
[
1
].
insert_at
(
pos
,
*
clip
,
1
);
m_playlists
[
1
].
consolidate_blanks
();
return
false
;
}
}
if
(
m_sameCompositions
.
count
(
i
.
key
())
>
0
)
{
// There is a mix at clip start, adjust direction
...
...
@@ -1847,9 +1871,9 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
if
(
auto
ptr
=
m_parent
.
lock
())
{
ptr
->
getClipPtr
(
clipIds
.
second
)
->
setSubPlaylistIndex
(
dest_track
,
m_id
);
}
rearrange_playlists
();
bool
result
=
rearrange_playlists
();
auto
op
=
requestClipInsertion_lambda
(
clipIds
.
second
,
secondClipPos
,
updateView
,
finalMove
,
groupMove
);
bool
result
=
op
();
result
=
result
&&
op
();
if
(
result
)
{
build_mix
();
std
::
function
<
bool
(
void
)
>
local_undo
=
[]()
{
return
true
;
};
...
...
@@ -1872,14 +1896,14 @@ bool TrackModel::requestClipMix(std::pair<int, int> clipIds, int mixDuration, bo
ptr
->
getClipPtr
(
clipIds
.
second
)
->
requestResize
(
secondClipDuration
,
false
,
local_undo
,
local_redo
,
false
);
ptr
->
getClipPtr
(
clipIds
.
first
)
->
requestResize
(
firstClipDuration
,
true
,
local_undo
,
local_redo
,
false
);
}
operation
();
bool
result
=
operation
();
if
(
auto
ptr
=
m_parent
.
lock
())
{
ptr
->
getClipPtr
(
clipIds
.
second
)
->
setSubPlaylistIndex
(
source_track
,
m_id
);
}
rearrange_playlists_undo
();
re
sult
=
result
&&
re
arrange_playlists_undo
();
auto
op
=
requestClipInsertion_lambda
(
clipIds
.
second
,
secondClipPos
,
updateView
,
finalMove
,
groupMove
);
op
();
return
true
;
result
=
result
&&
op
();
return
result
;
};
res
=
res
&&
replay
();
if
(
res
)
{
...
...
@@ -1920,6 +1944,7 @@ std::pair<MixInfo, MixInfo> TrackModel::getMixInfo(int clipId) const
}
}
else
{
startMix
.
firstClipId
=
-
1
;
startMix
.
secondClipId
=
-
1
;
}
int
secondClip
=
m_mixList
.
value
(
clipId
,
-
1
);
if
(
secondClip
>
-
1
)
{
...
...
@@ -1941,6 +1966,7 @@ std::pair<MixInfo, MixInfo> TrackModel::getMixInfo(int clipId) const
}
}
else
{
endMix
.
firstClipId
=
-
1
;
endMix
.
secondClipId
=
-
1
;
}
result
=
{
startMix
,
endMix
};
return
result
;
...
...
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