// special cases (middle click button or ctrl / shift click
if (event->button() == Qt::MidButton) {
- m_document->renderer()->switchPlay();
+ emit playMonitor();
m_blockRefresh = false;
m_operationMode = NONE;
return;
ClipItem *item = getClipItemAt((int) info.startPos.frames(m_document->fps()), info.track);
if (!item || cutTime >= item->endPos() || cutTime <= item->startPos()) {
emit displayMessage(i18n("Cannot find clip to cut"), ErrorMessage);
- kDebug() << "///////// ERROR CUTTING CLIP : (" << item->startPos().frames(25) << "-" << item->endPos().frames(25) << "), INFO: (" << info.startPos.frames(25) << "-" << info.endPos.frames(25) << ")" << ", CUT: " << cutTime.frames(25);
+ if (item) kDebug() << "///////// ERROR CUTTING CLIP : (" << item->startPos().frames(25) << "-" << item->endPos().frames(25) << "), INFO: (" << info.startPos.frames(25) << "-" << info.endPos.frames(25) << ")" << ", CUT: " << cutTime.frames(25);
+ else kDebug() << "/// ERROR NO CLIP at: " << info.startPos.frames(m_document->fps()) << ", track: " << info.track;
m_blockRefresh = false;
return NULL;
}
new ResizeClipCommand(this, clip->info(), newclipInfo, false, false, command);
clip->resizeEnd(info.startPos.frames(m_document->fps()));
}
- } else if (clip->endPos() < info.endPos) {
+ } else if (clip->endPos() <= info.endPos) {
new AddTimelineClipCommand(this, clip->xml(), clip->clipProducer(), clip->info(), clip->effectList(), false, false, false, true, command);
scene()->removeItem(clip);
delete clip;
void CustomTrackView::addTrack(TrackInfo type, int ix)
{
if (ix == -1 || ix == m_document->tracksCount()) {
- m_document->insertTrack(ix, type);
+ m_document->insertTrack(0, type);
m_document->renderer()->mltInsertTrack(1, type.type == VIDEOTRACK);
} else {
m_document->insertTrack(m_document->tracksCount() - ix, type);
ItemInfo clipinfo = item->info();
if (item->type() == AVWIDGET) {
ClipItem *clip = static_cast <ClipItem *>(item);
- // slowmotion clips are not track dependant, so no need to update them
- if (clip->speed() != 1.0) continue;
+ // slowmotion clips are not track dependant, so no need to update them
+ if (clip->speed() != 1.0) continue;
// We add a move clip command so that we get the correct producer for new track number
if (clip->clipType() == AV || clip->clipType() == AUDIO) {
Mlt::Producer *prod;
void CustomTrackView::slotUpdateAllThumbs()
{
+ if (!isEnabled()) return;
QList<QGraphicsItem *> itemList = items();
//if (itemList.isEmpty()) return;
ClipItem *item;