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
258
Issues
258
List
Boards
Labels
Service Desk
Milestones
Merge Requests
15
Merge Requests
15
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
59b62ceb
Commit
59b62ceb
authored
Apr 17, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
parent
87cfe999
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
8 deletions
+17
-8
src/core.cpp
src/core.cpp
+3
-0
src/timeline2/model/timelinefunctions.cpp
src/timeline2/model/timelinefunctions.cpp
+12
-6
src/timeline2/model/timelinefunctions.hpp
src/timeline2/model/timelinefunctions.hpp
+1
-0
tests/regressions.cpp
tests/regressions.cpp
+1
-1
tests/trimmingtest.cpp
tests/trimmingtest.cpp
+0
-1
No files found.
src/core.cpp
View file @
59b62ceb
...
...
@@ -906,6 +906,9 @@ std::unique_ptr<Mlt::Producer> Core::getTrackProducerInstance(int tid)
bool
Core
::
enableMultiTrack
(
bool
enable
)
{
if
(
!
m_guiConstructed
||
!
m_mainWindow
->
getCurrentTimeline
())
{
return
false
;
}
bool
isMultiTrack
=
pCore
->
monitorManager
()
->
isMultiTrack
();
if
(
isMultiTrack
||
enable
)
{
pCore
->
window
()
->
getMainTimeline
()
->
controller
()
->
slotMultitrackView
(
enable
,
enable
);
...
...
src/timeline2/model/timelinefunctions.cpp
View file @
59b62ceb
...
...
@@ -1524,23 +1524,27 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
}
}
if
(
!
clipsImported
)
{
QTimer
::
singleShot
(
200
,
timeline
.
get
(),
[
timeline
,
copiedItems
,
position
]()
{
TimelineFunctions
::
pasteTimelineClips
(
timeline
,
copiedItems
,
position
);
});
// Clips from same document, directly proceed to pasting
return
TimelineFunctions
::
pasteTimelineClips
(
timeline
,
copiedItems
,
position
,
undo
,
redo
,
false
);
}
qDebug
()
<<
"++++++++++++
\n
WAITIND FOR BIN INSERTION: "
<<
waitingBinIds
<<
"
\n\n
+++++++++++++"
;
return
true
;
}
bool
TimelineFunctions
::
pasteTimelineClips
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
QDomDocument
copiedItems
,
int
position
)
{
std
::
function
<
bool
(
void
)
>
timeline_undo
=
[]()
{
return
true
;
};
std
::
function
<
bool
(
void
)
>
timeline_redo
=
[]()
{
return
true
;
};
return
TimelineFunctions
::
pasteTimelineClips
(
timeline
,
copiedItems
,
position
,
timeline_undo
,
timeline_redo
,
true
);
}
bool
TimelineFunctions
::
pasteTimelineClips
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
QDomDocument
copiedItems
,
int
position
,
Fun
&
timeline_undo
,
Fun
&
timeline_redo
,
bool
pushToStack
)
{
// Wait until all bin clips are inserted
QDomNodeList
clips
=
copiedItems
.
documentElement
().
elementsByTagName
(
QStringLiteral
(
"clip"
));
QDomNodeList
compositions
=
copiedItems
.
documentElement
().
elementsByTagName
(
QStringLiteral
(
"composition"
));
int
offset
=
copiedItems
.
documentElement
().
attribute
(
QStringLiteral
(
"offset"
)).
toInt
();
std
::
function
<
bool
(
void
)
>
timeline_undo
=
[]()
{
return
true
;
};
std
::
function
<
bool
(
void
)
>
timeline_redo
=
[]()
{
return
true
;
};
bool
res
=
true
;
QLocale
locale
;
std
::
unordered_map
<
int
,
int
>
correspondingIds
;
...
...
@@ -1641,7 +1645,9 @@ bool TimelineFunctions::pasteTimelineClips(const std::shared_ptr<TimelineItemMod
PUSH_FRONT_LAMBDA
(
unselect
,
timeline_undo
);
PUSH_FRONT_LAMBDA
(
unselect
,
timeline_redo
);
//UPDATE_UNDO_REDO_NOLOCK(timeline_redo, timeline_undo, undo, redo);
pCore
->
pushUndo
(
timeline_undo
,
timeline_redo
,
i18n
(
"Paste timeline clips"
));
if
(
pushToStack
)
{
pCore
->
pushUndo
(
timeline_undo
,
timeline_redo
,
i18n
(
"Paste timeline clips"
));
}
semaphore
.
release
(
1
);
return
true
;
}
...
...
src/timeline2/model/timelinefunctions.hpp
View file @
59b62ceb
...
...
@@ -60,6 +60,7 @@ struct TimelineFunctions
static
bool
pasteClips
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
const
QString
&
pasteString
,
int
trackId
,
int
position
);
static
bool
pasteClips
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
const
QString
&
pasteString
,
int
trackId
,
int
position
,
Fun
&
undo
,
Fun
&
redo
);
static
bool
pasteTimelineClips
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
QDomDocument
copiedItems
,
int
position
);
static
bool
pasteTimelineClips
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
QDomDocument
copiedItems
,
int
position
,
Fun
&
timeline_undo
,
Fun
&
timeline_redo
,
bool
pushToStack
);
/* @brief Request the addition of multiple clips to the timeline
* If the addition of any of the clips fails, the entire operation is undone.
...
...
tests/regressions.cpp
View file @
59b62ceb
...
...
@@ -873,7 +873,7 @@ TEST_CASE("FuzzBug5")
REQUIRE
(
timeline_0
->
checkConsistency
());
REQUIRE
(
timeline_1
->
checkConsistency
());
{
bool
res
=
timeline_1
->
requestGroupMove
(
10
,
9
,
0
,
0
,
false
,
false
);
bool
res
=
timeline_1
->
requestGroupMove
(
10
,
9
,
0
,
0
,
true
,
false
,
false
);
REQUIRE
(
res
==
false
);
}
REQUIRE
(
timeline_0
->
checkConsistency
());
...
...
tests/trimmingtest.cpp
View file @
59b62ceb
...
...
@@ -1052,7 +1052,6 @@ TEST_CASE("Copy/paste", "[CP]")
cid4
=
timeline
->
m_groups
->
getSplitPartner
(
cid3
);
state2
(
tid2b
);
}
binModel
->
clean
();
pCore
->
m_projectManager
=
nullptr
;
Logger
::
print_trace
();
...
...
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