if (!KdenliveSettings::showdescriptioncolumn()) hideColumn(2);
if (!KdenliveSettings::showratingcolumn()) hideColumn(3);
- setIconSize(QSize(60, 40));
setSortingEnabled(true);
}
const QString text = model()->headerData(i, Qt::Horizontal).toString();
QAction* action = popup.addAction(text);
action->setCheckable(true);
- action->setChecked(!headerView->isSectionHidden(logicalIndex));
+ action->setChecked(!headerView->isSectionHidden(i));
action->setData(i);
}
else if (item->isGroup()) {
if ((columnAt(event->pos().x()) == 1)) QTreeWidget::mouseDoubleClickEvent(event);
} else {
- if ((columnAt(event->pos().x()) == 2)) QTreeWidget::mouseDoubleClickEvent(event);
- else emit showProperties(item->referencedClip());
+ if ((columnAt(event->pos().x()) == 1) && (item->clipType() == SLIDESHOW || item->clipType() == TEXT || item->clipType() == COLOR)) QTreeWidget::mouseDoubleClickEvent(event);
+ else if ((columnAt(event->pos().x()) == 2)) QTreeWidget::mouseDoubleClickEvent(event);
+ else emit showProperties(item->referencedClip());
}
}
}
const QList <QUrl> list = event->mimeData()->urls();
foreach(const QUrl &url, list) {
- emit addClip(url, groupName);
+ emit addClip(KUrl(url), groupName);
}
} else if (event->mimeData()->hasFormat("kdenlive/producerslist")) {
// virtual
void ProjectListView::mouseMoveEvent(QMouseEvent *event) {
- kDebug() << "// DRAG STARTED, MOUSE MOVED: ";
+ //kDebug() << "// DRAG STARTED, MOUSE MOVED: ";
if (!m_dragStarted) return;
if ((event->pos() - m_DragStartPosition).manhattanLength()
//mimeData->setText(ids.join(";")); //doc.toString());
//mimeData->setImageData(image);
drag->setMimeData(mimeData);
- drag->setPixmap(clickItem->icon(0).pixmap((int)(50 *16 / 9.0), 50));
+ drag->setPixmap(clickItem->icon(0).pixmap(iconSize()));
drag->setHotSpot(QPoint(0, 50));
- drag->start(Qt::MoveAction);
-
- //Qt::DropAction dropAction;
- //dropAction = drag->start(Qt::CopyAction | Qt::MoveAction);
-
- //Qt::DropAction dropAction = drag->exec();
-
+ Qt::DropAction dropAction = drag->exec(Qt::MoveAction);
}
//event->accept();
}
// virtual
void ProjectListView::dragMoveEvent(QDragMoveEvent * event) {
- QTreeWidgetItem * item = itemAt(event->pos());
event->setDropAction(Qt::IgnoreAction);
- //if (item) {
event->setDropAction(Qt::MoveAction);
if (event->mimeData()->hasText()) {
event->acceptProposedAction();
}
- //}
+ // stop playing because we get a crash otherwise when fetching the thumbnails
+ emit pauseMonitor();
}
QStringList ProjectListView::mimeTypes() const {