]> git.sesse.net Git - kdenlive/commitdiff
Fix monitor switching sometimes giving gray screen
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 3 Oct 2011 10:25:04 +0000 (10:25 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Mon, 3 Oct 2011 10:25:04 +0000 (10:25 +0000)
svn path=/trunk/kdenlive/; revision=5940

src/mainwindow.cpp
src/mainwindow.h
src/monitormanager.cpp
src/monitormanager.h

index 42bf7ac76be153586b9741b52c65c63ce6118e75..594e1b09ae86dc6f8805026afa1b3ad9496e01d6 100644 (file)
@@ -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;
index 848f23fac393a396adc97ac150cc5f6441c95367..4aab6269cd128b61c5c790852b85e7104bc8a023 100644 (file)
@@ -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);
index 662748e83605cd16c26ed3d7b0bb4a04014399ca..55a570c8e2f7c64d57aa92883f99f543a2a42f05 100644 (file)
@@ -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();
 }
 
index 30e1864be2c959c9563c163845495fe495d5c82c..7f35aa4031b8f00fbbe3e23e495ee5413dda8215 100644 (file)
@@ -80,8 +80,6 @@ private:
     QList <AbstractMonitor *>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 */