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
1c804123
Commit
1c804123
authored
Sep 24, 2019
by
Jean-Baptiste Mardelle
Browse files
Disable multitrack view on render
parent
d02863d2
Pipeline
#8199
passed with stage
in 13 minutes and 51 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/monitor/monitor.h
View file @
1c804123
...
...
@@ -351,7 +351,7 @@ signals:
void
addMasterEffect
(
QString
,
const
QStringList
&
);
void
passKeyPress
(
QKeyEvent
*
);
/** @brief Enable / disable project monitor multitrack view (split view with one track in each quarter). */
void
multitrackView
(
bool
);
void
multitrackView
(
bool
,
bool
);
void
timeCodeUpdated
(
const
QString
&
);
void
addMarker
();
void
deleteMarker
(
bool
deleteGuide
=
true
);
...
...
src/monitor/monitormanager.cpp
View file @
1c804123
...
...
@@ -407,14 +407,14 @@ void MonitorManager::setupActions()
connect
(
projectStart
,
&
QAction
::
triggered
,
this
,
&
MonitorManager
::
slotStart
);
pCore
->
window
()
->
addAction
(
QStringLiteral
(
"seek_start"
),
projectStart
,
Qt
::
CTRL
+
Qt
::
Key_Home
);
QAction
*
multiTrack
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"view-split-left-right"
)),
i18n
(
"Multitrack view"
),
this
);
multiTrack
->
setCheckable
(
true
);
connect
(
multiTrack
,
&
QAction
::
triggered
,
[
&
](
bool
checked
)
{
m_
multiTrack
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"view-split-left-right"
)),
i18n
(
"Multitrack view"
),
this
);
m_
multiTrack
->
setCheckable
(
true
);
connect
(
m_
multiTrack
,
&
QAction
::
triggered
,
[
&
](
bool
checked
)
{
if
(
m_projectMonitor
)
{
m_projectMonitor
->
multitrackView
(
checked
);
m_projectMonitor
->
multitrackView
(
checked
,
true
);
}
});
pCore
->
window
()
->
addAction
(
QStringLiteral
(
"monitor_multitrack"
),
multiTrack
);
pCore
->
window
()
->
addAction
(
QStringLiteral
(
"monitor_multitrack"
),
m_
multiTrack
);
QAction
*
projectEnd
=
new
QAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"go-last"
)),
i18n
(
"Go to Project End"
),
this
);
connect
(
projectEnd
,
&
QAction
::
triggered
,
this
,
&
MonitorManager
::
slotEnd
);
...
...
@@ -630,3 +630,11 @@ void MonitorManager::slotZoomOut()
static_cast
<
Monitor
*>
(
m_activeMonitor
)
->
slotZoomOut
();
}
}
bool
MonitorManager
::
isMultiTrack
()
const
{
if
(
m_multiTrack
)
{
return
m_multiTrack
->
isChecked
();
}
return
false
;
}
src/monitor/monitormanager.h
View file @
1c804123
...
...
@@ -68,6 +68,8 @@ public:
void
refreshIcons
();
void
resetDisplay
();
QDir
getCacheFolder
(
CacheType
type
);
/** @brief Returns true if multitrack view is enabled in project monitor. */
bool
isMultiTrack
()
const
;
public
slots
:
...
...
@@ -135,6 +137,7 @@ private:
AbstractMonitor
*
m_activeMonitor
{
nullptr
};
QList
<
AbstractMonitor
*>
m_monitorsList
;
KDualAction
*
m_muteAction
;
QAction
*
m_multiTrack
{
nullptr
};
signals:
/** @brief When the monitor changed, update the visible color scopes */
...
...
src/project/projectmanager.cpp
View file @
1c804123
...
...
@@ -671,23 +671,16 @@ void ProjectManager::slotAutoSave()
QString
ProjectManager
::
projectSceneList
(
const
QString
&
outputFolder
)
{
// TODO: re-implement overlay and all
// TODO refac: repair this
return
pCore
->
monitorManager
()
->
projectMonitor
()
->
sceneList
(
outputFolder
);
/*bool multitrackEnabled = m_trackView->multitrackView;
if (multitrackEnabled) {
// Multitrack view was enabled, disable for auto save
m_trackView->slotMultitrackView(false);
// Disable multitrack view
bool
isMultiTrack
=
pCore
->
monitorManager
()
->
isMultiTrack
();
if
(
isMultiTrack
)
{
pCore
->
window
()
->
getMainTimeline
()
->
controller
()
->
slotMultitrackView
(
false
,
false
);
}
m_trackView->connectOverlayTrack(false);
QString
scene
=
pCore
->
monitorManager
()
->
projectMonitor
()
->
sceneList
(
outputFolder
);
m_trackView->connectOverlayTrack(true);
if (multitrackEnabled) {
// Multitrack view was enabled, re-enable for auto save
m_trackView->slotMultitrackView(true);
if
(
isMultiTrack
)
{
pCore
->
window
()
->
getMainTimeline
()
->
controller
()
->
slotMultitrackView
(
true
,
false
);
}
return
scene
;
*/
}
void
ProjectManager
::
setDocumentNotes
(
const
QString
&
notes
)
...
...
src/timeline2/model/timelinefunctions.cpp
View file @
1c804123
...
...
@@ -779,7 +779,7 @@ void TimelineFunctions::setCompositionATrack(const std::shared_ptr<TimelineItemM
pCore
->
pushUndo
(
undo
,
redo
,
i18n
(
"Change Composition Track"
));
}
void
TimelineFunctions
::
enableMultitrackView
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
bool
enable
)
void
TimelineFunctions
::
enableMultitrackView
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
bool
enable
,
bool
refresh
)
{
QList
<
int
>
videoTracks
;
for
(
const
auto
&
track
:
timeline
->
m_iteratorTable
)
{
...
...
@@ -930,7 +930,9 @@ void TimelineFunctions::enableMultitrackView(const std::shared_ptr<TimelineItemM
}
}
field
->
unlock
();
timeline
->
requestMonitorRefresh
();
if
(
refresh
)
{
timeline
->
requestMonitorRefresh
();
}
}
void
TimelineFunctions
::
saveTimelineSelection
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
const
std
::
unordered_set
<
int
>
&
selection
,
...
...
src/timeline2/model/timelinefunctions.hpp
View file @
1c804123
...
...
@@ -110,7 +110,7 @@ struct TimelineFunctions
static
bool
requestSplitAudio
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
clipId
,
int
audioTarget
);
static
bool
requestSplitVideo
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
clipId
,
int
videoTarget
);
static
void
setCompositionATrack
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
int
cid
,
int
aTrack
);
static
void
enableMultitrackView
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
bool
enable
);
static
void
enableMultitrackView
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
bool
enable
,
bool
refresh
);
static
void
saveTimelineSelection
(
const
std
::
shared_ptr
<
TimelineItemModel
>
&
timeline
,
const
std
::
unordered_set
<
int
>
&
selection
,
const
QDir
&
targetDir
);
/** @brief returns the number of same type tracks between 2 tracks
*/
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
1c804123
...
...
@@ -2454,9 +2454,9 @@ bool TimelineController::exists(int itemId)
return
m_model
->
isClip
(
itemId
)
||
m_model
->
isComposition
(
itemId
);
}
void
TimelineController
::
slotMultitrackView
(
bool
enable
)
void
TimelineController
::
slotMultitrackView
(
bool
enable
,
bool
refresh
)
{
TimelineFunctions
::
enableMultitrackView
(
m_model
,
enable
);
TimelineFunctions
::
enableMultitrackView
(
m_model
,
enable
,
refresh
);
}
void
TimelineController
::
saveTimelineSelection
(
const
QDir
&
targetDir
)
...
...
src/timeline2/view/timelinecontroller.h
View file @
1c804123
...
...
@@ -482,7 +482,7 @@ public slots:
void
invalidateZone
(
int
in
,
int
out
);
void
checkDuration
();
/** @brief Dis / enable multi track view. */
void
slotMultitrackView
(
bool
enable
);
void
slotMultitrackView
(
bool
enable
,
bool
refresh
=
true
);
/** @brief Save timeline selected clips to target folder. */
void
saveTimelineSelection
(
const
QDir
&
targetDir
);
/** @brief Restore timeline scroll pos on open. */
...
...
Write
Preview
Supports
Markdown
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