From: Jean-Baptiste Mardelle Date: Mon, 3 Oct 2011 10:25:04 +0000 (+0000) Subject: Fix monitor switching sometimes giving gray screen X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=e71a0b9a36b5c5f1b27674b335a1316a3985e084;p=kdenlive Fix monitor switching sometimes giving gray screen svn path=/trunk/kdenlive/; revision=5940 --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 42bf7ac7..594e1b09 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -570,7 +570,6 @@ MainWindow::MainWindow(const QString &MltPath, const KUrl & Url, const QString & connect(m_projectMonitorDock, SIGNAL(visibilityChanged(bool)), m_projectMonitor, SLOT(refreshMonitor(bool))); connect(m_clipMonitorDock, SIGNAL(visibilityChanged(bool)), m_clipMonitor, SLOT(refreshMonitor(bool))); //connect(m_monitorManager, SIGNAL(connectMonitors()), this, SLOT(slotConnectMonitors())); - connect(m_monitorManager, SIGNAL(raiseMonitor(AbstractMonitor *)), this, SLOT(slotRaiseMonitor(AbstractMonitor *))); connect(m_monitorManager, SIGNAL(checkColorScopes()), this, SLOT(slotUpdateColorScopes())); connect(m_monitorManager, SIGNAL(clearScopes()), this, SLOT(slotClearColorScopes())); connect(m_effectList, SIGNAL(addEffect(const QDomElement)), this, SLOT(slotAddEffect(const QDomElement))); @@ -833,12 +832,6 @@ void MainWindow::slotAddEffect(const QDomElement effect) else m_activeTimeline->projectView()->slotAddEffect(effectToAdd, GenTime(), -1); } -void MainWindow::slotRaiseMonitor(AbstractMonitor *monitor) -{ - if (monitor == m_clipMonitor) m_clipMonitorDock->raise(); - else if (monitor == m_projectMonitor) m_projectMonitorDock->raise(); -} - void MainWindow::slotUpdateClip(const QString &id) { if (!m_activeDocument) return; diff --git a/src/mainwindow.h b/src/mainwindow.h index 848f23fa..4aab6269 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -347,7 +347,6 @@ private slots: /** @brief Reflects setting changes to the GUI. */ void updateConfiguration(); void slotConnectMonitors(); - void slotRaiseMonitor(AbstractMonitor *monitor); void slotUpdateClip(const QString &id); void slotUpdateMousePosition(int pos); void slotAddEffect(const QDomElement effect); diff --git a/src/monitormanager.cpp b/src/monitormanager.cpp index 662748e8..55a570c8 100644 --- a/src/monitormanager.cpp +++ b/src/monitormanager.cpp @@ -73,11 +73,13 @@ void MonitorManager::activateMonitor(QString name) for (int i = 0; i < m_monitorsList.count(); i++) { if (m_monitorsList.at(i)->name() == name) { m_activeMonitor = m_monitorsList.at(i); - emit raiseMonitor(m_activeMonitor); } else m_monitorsList.at(i)->stop(); } - if (m_activeMonitor) m_activeMonitor->start(); + if (m_activeMonitor) { + m_activeMonitor->parentWidget()->raise(); + m_activeMonitor->start(); + } emit checkColorScopes(); } @@ -195,7 +197,7 @@ void MonitorManager::slotResetProfiles() //m_projectMonitor->refreshMonitor(true); if (!active.isEmpty()) activateMonitor(active); blockSignals(false); - emit raiseMonitor(m_activeMonitor); + m_activeMonitor->parentWidget()->raise(); emit checkColorScopes(); } diff --git a/src/monitormanager.h b/src/monitormanager.h index 30e1864b..7f35aa40 100644 --- a/src/monitormanager.h +++ b/src/monitormanager.h @@ -80,8 +80,6 @@ private: QList m_monitorsList; signals: - /** @brief Emitted when the active monitor changes */ - void raiseMonitor(AbstractMonitor *); /** @brief When the monitor changed, update the visible color scopes */ void checkColorScopes(); /** @brief When the active monitor renderer was deleted, reset color scopes */