Skip to content
GitLab
Menu
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
fbbac115
Commit
fbbac115
authored
Jul 27, 2021
by
Jean-Baptiste Mardelle
Browse files
Make time remap a checkable option in the context menu so it can easily be removed
parent
f6048bd1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
fbbac115
...
...
@@ -1655,6 +1655,9 @@ void MainWindow::setupActions()
act
=
addAction
(
QStringLiteral
(
"edit_item_remap"
),
i18n
(
"Time Remap"
),
this
,
SLOT
(
slotRemapItemTime
()),
QIcon
::
fromTheme
(
QStringLiteral
(
"speedometer"
)),
QKeySequence
(),
clipActionCategory
);
// "C" as data means this action should only be available for clips - not for compositions
act
->
setData
(
'R'
);
act
->
setCheckable
(
true
);
act
->
setEnabled
(
false
);
act
=
addAction
(
QStringLiteral
(
"clip_in_project_tree"
),
i18n
(
"Clip in Project Bin"
),
this
,
SLOT
(
slotClipInProjectTree
()),
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
fbbac115
...
...
@@ -2208,7 +2208,14 @@ void TimelineController::remapItemTime(int clipId, double speed)
pCore
->
displayMessage
(
i18n
(
"No item to edit"
),
ErrorMessage
,
500
);
return
;
}
pCore
->
remapClip
(
clipId
);
if
(
m_model
->
m_allClips
[
clipId
]
->
isChain
())
{
// Remove remap effect
m_model
->
requestClipTimeRemap
(
clipId
,
false
);
pCore
->
remapClip
(
-
1
);
}
else
{
// Add remap effect
pCore
->
remapClip
(
clipId
);
}
}
void
TimelineController
::
changeItemSpeed
(
int
clipId
,
double
speed
)
...
...
@@ -3354,6 +3361,11 @@ void TimelineController::updateClipActions()
}
else
if
(
actionData
==
QLatin1Char
(
'P'
))
{
// Position actions should stay enabled in clip monitor
enableAction
=
true
;
}
else
if
(
actionData
==
QLatin1Char
(
'R'
))
{
enableAction
=
clip
!=
nullptr
;
if
(
enableAction
)
{
act
->
setChecked
(
clip
->
isChain
());
}
}
act
->
setEnabled
(
enableAction
);
}
...
...
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