Commit e25abd4e authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Merge branch '2212'

parents 4f313071 ff9d9d35
Pipeline #278342 canceled with stage
in 7 minutes and 27 seconds
......@@ -237,13 +237,6 @@ void Core::buildDocks()
connect(m_capture.get(), &MediaCapture::recordStateChanged, m_mixerWidget, &MixerManager::recordStateChanged);
connect(m_mixerWidget, &MixerManager::updateRecVolume, m_capture.get(), &MediaCapture::setAudioVolume);
connect(m_monitorManager, &MonitorManager::cleanMixer, m_mixerWidget, &MixerManager::clearMixers);
connect(m_subtitleWidget, &SubtitleEdit::addSubtitle, m_mainWindow, &MainWindow::slotAddSubtitle);
connect(m_subtitleWidget, &SubtitleEdit::cutSubtitle, this, [this](int id, int cursorPos) {
if (m_guiConstructed && m_mainWindow->getCurrentTimeline()->controller()) {
m_mainWindow->getCurrentTimeline()->controller()->cutSubtitle(id, cursorPos);
}
});
m_mixerWidget->checkAudioLevelVersion();
// Library
......@@ -254,6 +247,12 @@ void Core::buildDocks()
// Subtitles
m_subtitleWidget = new SubtitleEdit(m_mainWindow);
connect(m_subtitleWidget, &SubtitleEdit::addSubtitle, m_mainWindow, &MainWindow::slotAddSubtitle);
connect(m_subtitleWidget, &SubtitleEdit::cutSubtitle, this, [this](int id, int cursorPos) {
if (m_guiConstructed && m_mainWindow->getCurrentTimeline()->controller()) {
m_mainWindow->getCurrentTimeline()->controller()->cutSubtitle(id, cursorPos);
}
});
// Text edit speech
m_textEditWidget = new TextBasedEdit(m_mainWindow);
......
......@@ -24,6 +24,7 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include <KConfigGroup>
#include <KLocalizedString>
#include <KSharedConfig>
#include <KToolBar>
#include <KXMLGUIFactory>
LayoutManagement::LayoutManagement(QObject *parent)
......@@ -57,7 +58,7 @@ LayoutManagement::LayoutManagement(QObject *parent)
m_layoutActions << layoutActions->addAction("load_layout" + QString::number(i), load);
}
// Dock Area Oriantation
// Dock Area Orientation
QAction *rowDockAreaAction = new QAction(QIcon::fromTheme(QStringLiteral("object-rows")), i18n("Arrange Dock Areas In Rows"), this);
layoutActions->addAction(QStringLiteral("horizontal_dockareaorientation"), rowDockAreaAction);
connect(rowDockAreaAction, &QAction::triggered, this, &LayoutManagement::slotDockAreaRows);
......@@ -232,7 +233,22 @@ bool LayoutManagement::loadLayout(const QString &layoutId, bool selectButton)
state.remove(0, 5);
}
pCore->window()->centralWidget()->setHidden(!timelineVisible);
// restore state disables all toolbars, so remember state
QList<KToolBar *> barsList = pCore->window()->toolBars();
QMap<QString, bool> toolbarVisibility;
for (auto &tb : barsList) {
toolbarVisibility.insert(tb->objectName(), tb->isVisible());
}
pCore->window()->processRestoreState(state);
// Restore toolbar status
QMapIterator<QString, bool> i(toolbarVisibility);
while (i.hasNext()) {
i.next();
KToolBar *tb = pCore->window()->toolBar(i.key());
if (tb) {
tb->setVisible(i.value());
}
}
pCore->window()->tabifyBins();
emit connectDocks(true);
if (selectButton) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment