Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Multimedia
Kdenlive
Commits
8a1fc777
Commit
8a1fc777
authored
May 08, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix title clip length 1 frame shorter than expected on creation
parent
5c9d4ead
Pipeline
#3388
passed with stage
in 13 minutes and 23 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
4 deletions
+5
-4
src/bin/bin.cpp
src/bin/bin.cpp
+1
-1
src/dialogs/clipcreationdialog.cpp
src/dialogs/clipcreationdialog.cpp
+1
-1
src/titler/titlewidget.cpp
src/titler/titlewidget.cpp
+3
-2
No files found.
src/bin/bin.cpp
View file @
8a1fc777
...
...
@@ -2650,7 +2650,7 @@ void Bin::showTitleWidget(const std::shared_ptr<ProjectClip> &clip)
if
(
dia_ui
.
exec
()
==
QDialog
::
Accepted
)
{
QMap
<
QString
,
QString
>
newprops
;
newprops
.
insert
(
QStringLiteral
(
"xmldata"
),
dia_ui
.
xml
().
toString
());
if
(
dia_ui
.
duration
()
!=
clip
->
duration
().
frames
(
pCore
->
getCurrentFps
())
+
1
)
{
if
(
dia_ui
.
duration
()
!=
clip
->
duration
().
frames
(
pCore
->
getCurrentFps
()))
{
// duration changed, we need to update duration
newprops
.
insert
(
QStringLiteral
(
"out"
),
clip
->
framesToTime
(
dia_ui
.
duration
()
-
1
));
int
currentLength
=
clip
->
getProducerDuration
();
...
...
src/dialogs/clipcreationdialog.cpp
View file @
8a1fc777
...
...
@@ -264,7 +264,7 @@ void ClipCreationDialog::createTitleClip(KdenliveDoc *doc, const QString &parent
properties
[
QStringLiteral
(
"xmldata"
)]
=
dia_ui
->
xml
().
toString
();
QString
titleSuggestion
=
dia_ui
->
titleSuggest
();
ClipCreator
::
createTitleClip
(
properties
,
dia_ui
->
duration
()
-
1
,
titleSuggestion
.
isEmpty
()
?
i18n
(
"Title clip"
)
:
titleSuggestion
,
parentFolder
,
ClipCreator
::
createTitleClip
(
properties
,
dia_ui
->
duration
(),
titleSuggestion
.
isEmpty
()
?
i18n
(
"Title clip"
)
:
titleSuggestion
,
parentFolder
,
std
::
move
(
model
));
}
delete
dia_ui
;
...
...
src/titler/titlewidget.cpp
View file @
8a1fc777
...
...
@@ -2049,8 +2049,9 @@ int TitleWidget::getNewStuff(const QString &configFile)
QDomDocument
TitleWidget
::
xml
()
{
QDomDocument
doc
=
m_titledocument
.
xml
(
m_startViewport
,
m_endViewport
);
doc
.
documentElement
().
setAttribute
(
QStringLiteral
(
"duration"
),
m_tc
.
getFrameCount
(
title_duration
->
text
()));
doc
.
documentElement
().
setAttribute
(
QStringLiteral
(
"out"
),
m_tc
.
getFrameCount
(
title_duration
->
text
()));
int
duration
=
m_tc
.
getFrameCount
(
title_duration
->
text
());
doc
.
documentElement
().
setAttribute
(
QStringLiteral
(
"duration"
),
duration
);
doc
.
documentElement
().
setAttribute
(
QStringLiteral
(
"out"
),
duration
-
1
);
return
doc
;
}
...
...
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