connect(clip, SIGNAL(abortProxy(const QString)), this, SLOT(slotAbortProxy(const QString)));
if (getProperties) {
m_listView->processLayout();
- m_refreshed = false;
QDomElement e = clip->toXML().cloneNode().toElement();
e.removeAttribute("file_hash");
m_infoQueue.insert(clip->getId(), e);
void ProjectList::requestClipInfo(const QDomElement xml, const QString id)
{
- m_refreshed = false;
m_infoQueue.insert(id, xml);
//if (m_infoQueue.count() == 1 || ) QTimer::singleShot(300, this, SLOT(slotProcessNextClipInQueue()));
}
m_proxyList.clear();
QMap <QString, QString> flist = doc->clipManager()->documentFolderList();
+ QStringList openedFolders = doc->getExpandedFolders();
QMapIterator<QString, QString> f(flist);
while (f.hasNext()) {
f.next();
- (void) new FolderProjectItem(m_listView, QStringList() << f.value(), f.key());
+ FolderProjectItem *folder = new FolderProjectItem(m_listView, QStringList() << f.value(), f.key());
+ folder->setExpanded(openedFolders.contains(f.key()));
}
QList <DocClipBase*> list = doc->clipManager()->documentClipList();
void ProjectList::slotCheckForEmptyQueue()
{
- if (!m_refreshed && m_thumbnailQueue.isEmpty() && m_infoQueue.isEmpty()) {
+ if (!m_refreshed && m_processingClips.isEmpty() && m_thumbnailQueue.isEmpty() && m_infoQueue.isEmpty()) {
m_refreshed = true;
emit loadingIsOver();
emit displayMessage(QString(), -1);
{
QString toReload;
ProjectItem *item = getItemById(clipId);
+ if (!m_refreshed) {
+ // we are still finishing to load the document
+ selectClip = false;
+ }
m_processingClips.removeAll(clipId);
if (m_infoQueue.isEmpty() && m_processingClips.isEmpty()) m_listView->setEnabled(true);
if (item && producer) {
else disconnect(m_listView, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotItemEdited(QTreeWidgetItem *, int)));
}
+QStringList ProjectList::expandedFolders() const
+{
+ QStringList result;
+ FolderProjectItem *item;
+ QTreeWidgetItemIterator it(m_listView);
+ while (*it) {
+ if ((*it)->type() != PROJECTFOLDERTYPE) {
+ ++it;
+ continue;
+ }
+ if ((*it)->isExpanded()) {
+ item = static_cast<FolderProjectItem *>(*it);
+ result.append(item->clipId());
+ }
+ ++it;
+ }
+ return result;
+}
+
#include "projectlist.moc"