Don't attempt activating a monitor if it is hidden.

CCBUG: 422849
parent 7dd81585
......@@ -902,16 +902,6 @@ void MainWindow::saveProperties(KConfigGroup &config)
}
}
void MainWindow::readProperties(const KConfigGroup &config)
{
// read properties here
KXmlGuiWindow::readProperties(config);
// TODO: fix session management
/*if (qApp->isSessionRestored()) {
pCore->projectManager()->openFile(QUrl::fromLocalFile(config.readEntry("kdenlive_lastUrl", QString())));
}*/
}
void MainWindow::saveNewToolbarConfig()
{
KXmlGuiWindow::saveNewToolbarConfig();
......
......@@ -146,8 +146,6 @@ protected:
/** @brief Saves the file and the window properties when saving the session. */
void saveProperties(KConfigGroup &config) override;
/** @brief Restores the window and the file when a session is loaded. */
void readProperties(const KConfigGroup &config) override;
void saveNewToolbarConfig() override;
private:
......
......@@ -153,6 +153,10 @@ bool MonitorManager::activateMonitor(Kdenlive::MonitorId name)
if (!m_clipMonitor->monitorIsFullScreen()) {
m_clipMonitor->parentWidget()->raise();
}
if (!m_clipMonitor->isVisible()) {
m_activeMonitor = m_projectMonitor;
return false;
}
emit updateOverlayInfos(name, KdenliveSettings::displayClipMonitorInfo());
m_projectMonitor->displayAudioMonitor(false);
m_clipMonitor->displayAudioMonitor(true);
......@@ -160,6 +164,10 @@ bool MonitorManager::activateMonitor(Kdenlive::MonitorId name)
if (!m_projectMonitor->monitorIsFullScreen()) {
m_projectMonitor->parentWidget()->raise();
}
if (!m_projectMonitor->isVisible()) {
m_activeMonitor = m_clipMonitor;
return false;
}
emit updateOverlayInfos(name, KdenliveSettings::displayProjectMonitorInfo());
m_clipMonitor->displayAudioMonitor(false);
m_projectMonitor->displayAudioMonitor(true);
......
Markdown is supported
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