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
f5b85e60
Commit
f5b85e60
authored
Jun 15, 2020
by
Jean-Baptiste Mardelle
Browse files
Add action to restore current clip target tracks to default
parent
ef43322a
Pipeline
#23713
passed with stage
in 9 minutes and 32 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/kdenliveui.rc
View file @
f5b85e60
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
<kpartgui
name=
"kdenlive"
version=
"18
5
"
translationDomain=
"kdenlive"
>
<kpartgui
name=
"kdenlive"
version=
"18
6
"
translationDomain=
"kdenlive"
>
<MenuBar>
<Menu
name=
"file"
>
<Action
name=
"file_save"
/>
...
...
@@ -153,6 +153,7 @@
<Action
name=
"switch_active_target"
/>
<Action
name=
"switch_all_targets"
/>
<Action
name=
"activate_all_targets"
/>
<Action
name=
"restore_all_sources"
/>
</Menu>
<Separator
/>
<Menu
name=
"video_effects_menu"
><text>
Add Effect
</text>
...
...
src/mainwindow.cpp
View file @
f5b85e60
...
...
@@ -1729,6 +1729,7 @@ void MainWindow::setupActions()
Qt
::
SHIFT
+
Qt
::
Key_A
);
addAction
(
QStringLiteral
(
"activate_all_targets"
),
i18n
(
"Switch All Tracks Active"
),
pCore
->
projectManager
(),
SLOT
(
slotMakeAllTrackActive
()),
QIcon
(),
Qt
::
SHIFT
+
Qt
::
ALT
+
Qt
::
Key_A
);
addAction
(
QStringLiteral
(
"restore_all_sources"
),
i18n
(
"Restore Current Clip Target Tracks"
),
pCore
->
projectManager
(),
SLOT
(
slotRestoreTargetTracks
()));
addAction
(
QStringLiteral
(
"add_project_note"
),
i18n
(
"Add Project Note"
),
pCore
->
projectManager
(),
SLOT
(
slotAddProjectNote
()),
QIcon
::
fromTheme
(
QStringLiteral
(
"bookmark-new"
)));
...
...
src/project/projectmanager.cpp
View file @
f5b85e60
...
...
@@ -804,6 +804,11 @@ void ProjectManager::slotMakeAllTrackActive()
pCore
->
window
()
->
getMainTimeline
()
->
controller
()
->
makeAllTrackActive
();
}
void
ProjectManager
::
slotRestoreTargetTracks
()
{
pCore
->
window
()
->
getMainTimeline
()
->
controller
()
->
restoreTargetTracks
();
}
void
ProjectManager
::
slotSwitchAllTrackLock
()
{
pCore
->
window
()
->
getMainTimeline
()
->
controller
()
->
switchTrackLock
(
true
);
...
...
src/project/projectmanager.h
View file @
f5b85e60
...
...
@@ -154,6 +154,8 @@ public slots:
void
slotSwitchAllTrackActive
();
/** @brief Make all tracks active or inactive */
void
slotMakeAllTrackActive
();
/** @brief Restore current clip target tracks */
void
slotRestoreTargetTracks
();
/** @brief Un/Set current track as target */
void
slotSwitchTrackTarget
();
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
f5b85e60
...
...
@@ -117,6 +117,11 @@ void TimelineController::setModel(std::shared_ptr<TimelineItemModel> model)
connect
(
m_model
.
get
(),
&
TimelineModel
::
checkTrackDeletion
,
this
,
&
TimelineController
::
checkTrackDeletion
,
Qt
::
DirectConnection
);
}
void
TimelineController
::
restoreTargetTracks
()
{
setTargetTracks
(
m_hasVideoTarget
,
m_model
->
m_binAudioTargets
);
}
void
TimelineController
::
setTargetTracks
(
bool
hasVideo
,
QMap
<
int
,
QString
>
audioTargets
)
{
int
videoTrack
=
-
1
;
...
...
src/timeline2/view/timelinecontroller.h
View file @
f5b85e60
...
...
@@ -512,6 +512,8 @@ public:
void
resetPreview
();
/** @brief Set target tracks (video, audio) */
void
setTargetTracks
(
bool
hasVideo
,
QMap
<
int
,
QString
>
audioTargets
);
/** @brief Restore Bin Clip original target tracks (video, audio) */
void
restoreTargetTracks
();
/** @brief Return asset's display name from it's id (effect or composition) */
Q_INVOKABLE
const
QString
getAssetName
(
const
QString
&
assetId
,
bool
isTransition
);
/** @brief Set keyboard grabbing on current selection */
...
...
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