From: Vincent P. <vin...@la...> - 2014-12-19 20:20:22
|
Git commit 2fbb5472170eff697f874582a8c99650f181b19b by Vincent PINON. Committed on 19/12/2014 at 16:48. Pushed by vpinon into branch 'master'. fix messed clips properties M +3 -1 src/mainwindow.cpp M +5 -7 src/project/projectlist.cpp M +1 -0 src/project/projectlist.h http://commits.kde.org/kdenlive/2fbb5472170eff697f874582a8c99650f181b19b diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 85e4aa0..a1445e7 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -945,7 +945,9 @@ void MainWindow::slotConnectMonitors() connect(m_projectMonitor->render, SIGNAL(replyGetImage(QString,QString,int,int)), m_projectList, SLOT(slotReplyGetImage(QString,QString,int,int))); connect(m_projectMonitor->render, SIGNAL(replyGetImage(QString,QImage)), m_projectList, SLOT(slotReplyGetImage(QString,QImage))); - connect(m_projectMonitor->render, SIGNAL(replyGetFileProperties(QString,Mlt::Producer*,stringMap,stringMap,bool)), m_projectList, SLOT(slotReplyGetFileProperties(QString,Mlt::Producer*,stringMap,stringMap,bool))); + connect(m_projectMonitor->render, SIGNAL(replyGetFileProperties(QString,Mlt::Producer*,stringMap,stringMap,bool)), m_projectList, SLOT(slotReplyGetFileProperties(QString,Mlt::Producer*,stringMap,stringMap,bool)), Qt::DirectConnection); + //DirectConnection was necessary not to mess the analyze queue, but the monitor thread shouldn't show any UI widget (profile dialog), so adding an AutoConnection in between? + connect(m_projectList, SIGNAL(firstClip(ProjectItem*)), m_projectList, SLOT(adjustProjectProfileToItem(ProjectItem*))); connect(m_projectMonitor->render, SIGNAL(removeInvalidClip(QString,bool)), m_projectList, SLOT(slotRemoveInvalidClip(QString,bool))); diff --git a/src/project/projectlist.cpp b/src/project/projectlist.cpp index d7dfde7..6c11e02 100644 --- a/src/project/projectlist.cpp +++ b/src/project/projectlist.cpp @@ -2353,13 +2353,11 @@ void ProjectList::slotReplyGetFileProperties(const QString &clipId, Mlt::Produce static_cast <FolderProjectItem *>(item->parent())->switchIcon(); } 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()); + emit firstClip(item); + //updatedProfile = adjustProjectProfileToItem(item); + //if (updatedProfile == false) { + // emit clipSelected(item->referencedClip()); + //} } } else { int max = m_doc->clipManager()->clipsCount(); diff --git a/src/project/projectlist.h b/src/project/projectlist.h index 1b4a662..b271bad 100644 --- a/src/project/projectlist.h +++ b/src/project/projectlist.h @@ -403,6 +403,7 @@ private slots: signals: void clipSelected(DocClipBase *, const QPoint &zone = QPoint(), bool forceUpdate = false); void receivedClipDuration(const QString &); + void firstClip(ProjectItem *); void showClipProperties(DocClipBase *); void showClipProperties(const QList <DocClipBase *>&, const QMap<QString, QString> &commonproperties); void projectModified(); |