]> git.sesse.net Git - kdenlive/commitdiff
Fix profile change on first clip load: http://kdenlive.org/mantis/view.php?id=2925
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 3 Jan 2013 18:23:32 +0000 (19:23 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 3 Jan 2013 18:23:32 +0000 (19:23 +0100)
src/mainwindow.cpp
src/monitor.cpp
src/monitormanager.cpp
src/projectlist.cpp
src/recmonitor.cpp
src/videoglwidget.cpp
src/videoglwidget.h

index cecbe4bb17542b3539c27cdc3d29a964567bdb93..3b64937db270269e57ded7e3d67bf92c0c22619c 100644 (file)
@@ -2425,7 +2425,6 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
     KdenliveSettings::setCurrent_profile(profile);
     KdenliveSettings::setProject_fps(m_activeDocument->fps());
     setCaption(m_activeDocument->description(), m_activeDocument->isModified());
-
     m_activeDocument->clipManager()->clearUnusedProducers();
     m_monitorManager->resetProfiles(m_activeDocument->timecode());
     m_transitionConfig->updateProjectFormat(m_activeDocument->mltProfile(), m_activeDocument->timecode(), m_activeDocument->tracksList());
@@ -2440,6 +2439,7 @@ void MainWindow::slotUpdateProjectProfile(const QString &profile)
     m_commandStack->activeStack()->clear();
     //Update the mouse position display so it will display in DF/NDF format by default based on the project setting.
     slotUpdateMousePosition(0);
+    m_projectList->slotReloadClip();
     // We need to desactivate & reactivate monitors to get a refresh
     //m_monitorManager->switchMonitors();
 }
index a35ff711ed9149f958b92fa51d3f1c8f16c29123..1c74137f162062a0aa1d39921ae7b3e8d8b37f17 100644 (file)
@@ -929,7 +929,7 @@ void Monitor::resetProfile(const QString &profile)
     if (!render->hasProfile(profile)) {
         slotActivateMonitor();
         render->resetProfile(profile);
-#ifdef USE_OPENGL    
+#ifdef USE_OPENGL
        if (m_glWidget) m_glWidget->setImageAspectRatio(render->dar());
 #endif
     }
index 178ffc1d1aec12e4cf3724bcbef75bde06284cc1..a871bb519c04162d17e5c1bf55a41df0e825fac8 100644 (file)
@@ -197,7 +197,9 @@ void MonitorManager::resetProfiles(Timecode tc)
 
 void MonitorManager::slotResetProfiles()
 {
-    if (m_projectMonitor == NULL || m_clipMonitor == NULL) return;
+    if (m_projectMonitor == NULL || m_clipMonitor == NULL) {
+       return;
+    }
     blockSignals(true);
     Kdenlive::MONITORID active = m_activeMonitor ? m_activeMonitor->id() : Kdenlive::noMonitor;
     m_clipMonitor->resetProfile(KdenliveSettings::current_profile());
index fdba31b31a92af0057b012242acd16669060d90a..97dad224eb6788755465c81e50b70e52f9ab9e58 100644 (file)
@@ -2269,6 +2269,9 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce
             } else if (KdenliveSettings::checkfirstprojectclip() &&  m_listView->topLevelItemCount() == 1 && m_refreshed && m_allClipsProcessed) {
                 // this is the first clip loaded in project, check if we want to adjust project settings to the clip
                 updatedProfile = adjustProjectProfileToItem(item);
+               if (updatedProfile == false) {
+                   emit clipSelected(item->referencedClip());
+               }
             }
             if (updatedProfile == false) {
                 //emit clipSelected(item->referencedClip());
index f2395efb87d2294b945cc356777843c12238bcea..6fbab09967ecb51d634126d6871bab4386859835 100644 (file)
@@ -867,7 +867,6 @@ void RecMonitor::slotStartGrab(const QRect &rect) {
 
 void RecMonitor::slotProcessStatus(QProcess::ProcessState status)
 {
-    kDebug()<<"// STATUS CHANGED: "<<status;
     if (status == QProcess::NotRunning) {
         m_displayProcess->kill();
         if (m_isCapturing && device_selector->currentIndex() != FIREWIRE)
index eff90f6ea97f53e1397fb9ab1fa443752ead13ac..52a698923d5e699da1021de8f63b1cfec8f1e063 100644 (file)
@@ -41,6 +41,12 @@ QSize VideoGLWidget::sizeHint() const
     return QSize(400, 300);
 }
 
+void VideoGLWidget::setImageAspectRatio(double ratio)
+{
+    m_display_ratio = ratio;
+    resizeGL(width(), height());
+}
+
 void VideoGLWidget::initializeGL()
 {
     qglClearColor(m_backgroundColor);
@@ -57,6 +63,7 @@ void VideoGLWidget::resizeEvent(QResizeEvent* event)
 {
     resizeGL(event->size().width(),event->size().height());
 }
+
 void VideoGLWidget::resizeGL(int width, int height)
 {
     double this_aspect = (double) width / height;
index 8a243ddc1f4f034831094aac83fdc1e58ab93654..2d492d9e00296a1a5a9680fd35c68a9e15909c3a 100644 (file)
@@ -14,9 +14,7 @@ public:
     void activateMonitor();
     QSize minimumSizeHint() const;
     QSize sizeHint() const;
-    void setImageAspectRatio(double ratio) {
-        m_display_ratio = ratio;
-    }
+    void setImageAspectRatio(double ratio);
     void setBackgroundColor(QColor color) {
         m_backgroundColor = color;
     }