From: Jean-Baptiste Mardelle Date: Fri, 29 May 2009 23:44:43 +0000 (+0000) Subject: Recreate project thumbs when document profile is changed X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d6c5ea7ceb77043e8fdf77c5eeacb627c6e54fbf;p=kdenlive Recreate project thumbs when document profile is changed svn path=/trunk/kdenlive/; revision=3451 --- diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ccf544b8..b2e6a87d 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1527,6 +1527,7 @@ void MainWindow::slotEditProjectSettings() if (m_renderWidget) m_renderWidget->setDocumentPath(w->selectedFolder().path()); if (m_activeDocument->profilePath() != profile) { // Profile was changed + double dar = m_activeDocument->dar(); m_activeDocument->setProfilePath(profile); KdenliveSettings::setCurrent_profile(profile); KdenliveSettings::setProject_fps(m_activeDocument->fps()); @@ -1535,7 +1536,7 @@ void MainWindow::slotEditProjectSettings() if (m_renderWidget) m_renderWidget->setProfile(m_activeDocument->mltProfile()); m_timelineArea->setTabText(m_timelineArea->currentIndex(), m_activeDocument->description()); m_activeDocument->clipManager()->resetProducersList(m_projectMonitor->render->producersList()); - + if (dar != m_activeDocument->dar()) m_projectList->reloadClipThumbnails(); // We need to desactivate & reactivate monitors to get a refresh m_monitorManager->switchMonitors(); } diff --git a/src/projectlist.cpp b/src/projectlist.cpp index 857b51e8..2fa8a85e 100644 --- a/src/projectlist.cpp +++ b/src/projectlist.cpp @@ -773,6 +773,18 @@ void ProjectList::slotCheckForEmptyQueue() } else QTimer::singleShot(500, this, SLOT(slotCheckForEmptyQueue())); } +void ProjectList::reloadClipThumbnails() +{ + m_thumbnailQueue.clear(); + QTreeWidgetItemIterator it(m_listView); + while (*it) { + if (!((ProjectItem *)(*it))->isGroup()) + m_thumbnailQueue << ((ProjectItem *)(*it))->clipId(); + ++it; + } + QTimer::singleShot(300, this, SLOT(slotProcessNextThumbnail())); +} + void ProjectList::requestClipThumbnail(const QString &id) { m_thumbnailQueue.append(id); diff --git a/src/projectlist.h b/src/projectlist.h index c52491c9..1352cd71 100644 --- a/src/projectlist.h +++ b/src/projectlist.h @@ -129,6 +129,7 @@ public: void setupMenu(QMenu *addMenu, QAction *defaultAction); void setupGeneratorMenu(QMenu *addMenu, QMenu *transcodeMenu); QString currentClipUrl() const; + void reloadClipThumbnails(); public slots: void setDocument(KdenliveDoc *doc);