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
e1c677c2
Commit
e1c677c2
authored
Aug 06, 2019
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix reverting clip speed modifies in/out
parent
ae333a7a
Pipeline
#6294
passed with stage
in 21 minutes and 45 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
src/timeline2/model/clipmodel.cpp
src/timeline2/model/clipmodel.cpp
+14
-0
src/timeline2/view/timelinecontroller.cpp
src/timeline2/view/timelinecontroller.cpp
+0
-1
No files found.
src/timeline2/model/clipmodel.cpp
View file @
e1c677c2
...
...
@@ -392,6 +392,15 @@ void ClipModel::refreshProducerFromBin(PlaylistState::ClipState state, double sp
QWriteLocker
locker
(
&
m_lock
);
int
in
=
getIn
();
int
out
=
getOut
();
bool
revertSpeed
=
false
;
if
(
speed
<
0
)
{
if
(
m_speed
>
0
)
{
revertSpeed
=
true
;
}
}
else
if
(
m_speed
<
0
)
{
revertSpeed
=
true
;
}
if
(
!
qFuzzyCompare
(
speed
,
m_speed
)
&&
!
qFuzzyCompare
(
speed
,
0.
))
{
in
=
in
*
std
::
abs
(
m_speed
/
speed
);
out
=
in
+
getPlaytime
()
-
1
;
...
...
@@ -400,6 +409,11 @@ void ClipModel::refreshProducerFromBin(PlaylistState::ClipState state, double sp
m_speed
=
speed
;
qDebug
()
<<
"changing speed"
<<
in
<<
out
<<
m_speed
;
}
if
(
revertSpeed
)
{
int
duration
=
out
-
in
;
in
=
m_producer
->
get_length
()
*
std
::
fabs
(
m_speed
)
-
out
;
out
=
in
+
duration
;
}
std
::
shared_ptr
<
ProjectClip
>
binClip
=
pCore
->
projectItemModel
()
->
getClipByBinID
(
m_binClipId
);
std
::
shared_ptr
<
Mlt
::
Producer
>
binProducer
=
binClip
->
getTimelineProducer
(
m_currentTrackId
,
m_id
,
state
,
m_speed
);
m_producer
=
std
::
move
(
binProducer
);
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
e1c677c2
...
...
@@ -1545,7 +1545,6 @@ void TimelineController::changeItemSpeed(int clipId, double speed)
minSpeed
=
std
::
max
(
minSpeed
,
minSpeed2
);
maxSpeed
=
std
::
min
(
maxSpeed
,
maxSpeed2
);
}
// speed = QInputDialog::getDouble(QApplication::activeWindow(), i18n("Clip Speed"), i18n("Percentage"), speed, minSpeed, maxSpeed, 2, &ok);
QScopedPointer
<
SpeedDialog
>
d
(
new
SpeedDialog
(
QApplication
::
activeWindow
(),
std
::
abs
(
speed
),
minSpeed
,
maxSpeed
,
speed
<
0
));
if
(
d
->
exec
()
!=
QDialog
::
Accepted
)
{
return
;
...
...
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