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
093d415e
Commit
093d415e
authored
Jun 02, 2020
by
Jean-Baptiste Mardelle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save timeline status (shown/hidden) in layouts
parent
39799e91
Pipeline
#22161
passed with stage
in 14 minutes and 28 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
src/layoutmanagement.cpp
src/layoutmanagement.cpp
+9
-0
src/mainwindow.cpp
src/mainwindow.cpp
+5
-0
src/mainwindow.h
src/mainwindow.h
+3
-0
No files found.
src/layoutmanagement.cpp
View file @
093d415e
...
...
@@ -104,6 +104,12 @@ void LayoutManagement::slotLoadLayout(QAction *action)
KSharedConfigPtr
config
=
KSharedConfig
::
openConfig
(
QStringLiteral
(
"kdenlive-layoutsrc"
));
KConfigGroup
layouts
(
config
,
"Layouts"
);
QByteArray
state
=
QByteArray
::
fromBase64
(
layouts
.
readEntry
(
layoutId
).
toLatin1
());
bool
timelineVisible
=
true
;
if
(
state
.
startsWith
(
"NO-TL"
))
{
timelineVisible
=
false
;
state
.
remove
(
0
,
5
);
}
pCore
->
window
()
->
centralWidget
()
->
setHidden
(
!
timelineVisible
);
pCore
->
window
()
->
restoreState
(
state
);
}
...
...
@@ -122,6 +128,9 @@ void LayoutManagement::slotSaveLayout(QAction *action)
layouts
.
deleteEntry
(
originallayoutName
);
QByteArray
st
=
pCore
->
window
()
->
saveState
();
if
(
!
pCore
->
window
()
->
timelineVisible
())
{
st
.
prepend
(
"NO-TL"
);
}
layoutName
.
append
(
'_'
+
QString
::
number
(
layoutId
));
layouts
.
writeEntry
(
layoutName
,
st
.
toBase64
());
initializeLayouts
();
...
...
src/mainwindow.cpp
View file @
093d415e
...
...
@@ -4070,6 +4070,11 @@ void MainWindow::slotExpandClip()
getCurrentTimeline
()
->
controller
()
->
expandActiveClip
();
}
bool
MainWindow
::
timelineVisible
()
const
{
return
!
centralWidget
()
->
isHidden
();
}
#ifdef DEBUG_MAINW
#undef DEBUG_MAINW
...
...
src/mainwindow.h
View file @
093d415e
...
...
@@ -128,6 +128,9 @@ public:
/** @brief Returns a pointer to the current timeline */
TimelineWidget
*
getCurrentTimeline
()
const
;
/** @brief Returns true if the timeline widget is visible */
bool
timelineVisible
()
const
;
protected:
/** @brief Closes the window.
...
...
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