Skip to content
GitLab
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
978fb8e5
Commit
978fb8e5
authored
Oct 06, 2022
by
Jean-Baptiste Mardelle
Browse files
Fix tests
parent
03ccdcdd
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/core.cpp
View file @
978fb8e5
...
...
@@ -336,6 +336,18 @@ Monitor *Core::getMonitor(int id)
return
m_monitorManager
->
projectMonitor
();
}
void
Core
::
seekMonitor
(
int
id
,
int
position
)
{
if
(
!
m_guiConstructed
)
{
return
;
}
if
(
id
==
Kdenlive
::
ProjectMonitor
)
{
m_monitorManager
->
projectMonitor
()
->
requestSeek
(
position
);
}
else
{
m_monitorManager
->
clipMonitor
()
->
requestSeek
(
position
);
}
}
Bin
*
Core
::
bin
()
{
return
m_mainWindow
->
getBin
();
...
...
src/core.h
View file @
978fb8e5
...
...
@@ -162,6 +162,8 @@ public:
void
refreshProjectItem
(
const
ObjectId
&
id
);
/** @brief Returns a reference to a monitor (clip or project monitor) */
Monitor
*
getMonitor
(
int
id
);
/** @brief Seek a monitor to position */
void
seekMonitor
(
int
id
,
int
position
);
/** @brief Returns timeline's active track info (position and tag) */
QPair
<
int
,
QString
>
currentTrackInfo
()
const
;
/** @brief This function must be called whenever the profile used changes */
...
...
src/timeline2/model/timelinefunctions.cpp
View file @
978fb8e5
...
...
@@ -1858,7 +1858,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
pCore
->
projectItemModel
()
->
requestAddBinClip
(
updatedId
,
currentProd
,
folderId
,
undo
,
redo
,
callBack
);
}
}
pCore
->
get
Monitor
(
Kdenlive
::
ProjectMonitor
)
->
requestSeek
(
position
+
pasteDuration
);
pCore
->
seek
Monitor
(
Kdenlive
::
ProjectMonitor
,
position
+
pasteDuration
);
}
if
(
!
docId
.
isEmpty
()
&&
docId
!=
pCore
->
currentDoc
()
->
getDocumentProperty
(
QStringLiteral
(
"documentid"
)))
{
...
...
@@ -1887,7 +1887,7 @@ bool TimelineFunctions::pasteClips(const std::shared_ptr<TimelineItemModel> &tim
pCore
->
projectItemModel
()
->
requestAddFolder
(
folderId
,
i18n
(
"Pasted clips"
),
rootId
,
undo
,
redo
);
}
QDomNodeList
binClips
=
copiedItems
.
documentElement
().
elementsByTagName
(
QStringLiteral
(
"producer"
));
pCore
->
get
Monitor
(
Kdenlive
::
ProjectMonitor
)
->
requestSeek
(
position
+
(
pasteDuration
*
ratio
));
pCore
->
seek
Monitor
(
Kdenlive
::
ProjectMonitor
,
position
+
(
pasteDuration
*
ratio
));
for
(
int
i
=
0
;
i
<
binClips
.
count
();
++
i
)
{
QDomElement
currentProd
=
binClips
.
item
(
i
).
toElement
();
if
(
ratio
!=
1.
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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