for (int i = 0; i < children.count(); i++) {
if (children.at(i)->type() == GROUPWIDGET) {
QList<QGraphicsItem *> subchildren = children.at(i)->childItems();
- for (int j = 0; j < subchildren.count(); j++) {
+ for (int j = 0; j < subchildren.count(); j++)
collidingItems.removeAll(subchildren.at(j));
- }
}
collidingItems.removeAll(children.at(i));
}
for (int i = 0; i < children.count(); i++) {
if (children.at(i)->type() == GROUPWIDGET) {
QList<QGraphicsItem *> subchildren = children.at(i)->childItems();
- for (int j = 0; j < subchildren.count(); j++) {
+ for (int j = 0; j < subchildren.count(); j++)
collidingItems.removeAll(subchildren.at(j));
- }
}
collidingItems.removeAll(children.at(i));
}
for (int i = 0; i < children.count(); i++) {
if (children.at(i)->type() == GROUPWIDGET) {
QList<QGraphicsItem *> subchildren = children.at(i)->childItems();
- for (int j = 0; j < subchildren.count(); j++) {
+ for (int j = 0; j < subchildren.count(); j++)
collidingItems.removeAll(subchildren.at(j));
- }
}
collidingItems.removeAll(children.at(i));
}
for (int i = 0; i < children.count(); i++) {
if (children.at(i)->type() == GROUPWIDGET) {
QList<QGraphicsItem *> subchildren = children.at(i)->childItems();
- for (int j = 0; j < subchildren.count(); j++) {
+ for (int j = 0; j < subchildren.count(); j++)
collidingItems.removeAll(subchildren.at(j));
- }
}
collidingItems.removeAll(children.at(i));
}
}
#if QT_VERSION >= 0x040600
// Add shadow to dragged item, currently disabled because of painting artifacts
- //TODO: re-enable when fixed
+ //TODO: re-enable when fixed
/*QGraphicsDropShadowEffect *eff = new QGraphicsDropShadowEffect();
eff->setBlurRadius(5);
eff->setOffset(3, 3);
if (m_dragItem && m_dragItem->hasKeyFrames()) {
/*if (m_moveOpMode == KEYFRAME) {
// user double clicked on a keyframe, open edit dialog
- //TODO: update for effects with several values per keyframe
+ //TODO: update for effects with several values per keyframe
QDialog d(parentWidget());
Ui::KeyFrameDialog_UI view;
view.setupUi(&d);
if (isLocked) item->setItemLocked(true);
ItemInfo clipInfo = info;
clipInfo.track = m_document->tracksCount() - item->track();
- if (m_document->renderer()->mltInsertClip(clipInfo, item->xml(), item->baseClip()->producer(item->track()), m_scene->editMode() == OVERWRITEEDIT, m_scene->editMode() == INSERTEDIT) == -1) {
+
+ int worked = m_document->renderer()->mltInsertClip(clipInfo, item->xml(), item->baseClip()->producer(item->track()), m_scene->editMode() == OVERWRITEEDIT, m_scene->editMode() == INSERTEDIT);
+ if (worked == -1) {
emit displayMessage(i18n("Cannot insert clip in timeline"), ErrorMessage);
brokenClips.append(item);
continue;
setDocumentModified();
/*
- // debug info
+ // debug info
QRectF rect(0, 1 * m_tracksHeight + m_tracksHeight / 2, sceneRect().width(), 2);
QList<QGraphicsItem *> selection = m_scene->items(rect);
QStringList timelineList;
if ((val < -50 || val > 150) && item->editedKeyFramePos() != start && item->editedKeyFramePos() != end) {
//delete keyframe
item->movedKeyframe(item->getEffectAt(item->selectedEffectIndex()), item->selectedKeyFramePos(), -1, 0);
- } else item->movedKeyframe(item->getEffectAt(item->selectedEffectIndex()), item->selectedKeyFramePos(), item->editedKeyFramePos(), item->editedKeyFrameValue());
+ } else {
+ item->movedKeyframe(item->getEffectAt(item->selectedEffectIndex()), item->selectedKeyFramePos(), item->editedKeyFramePos(), item->editedKeyFrameValue());
+ }
QDomElement newEffect = item->selectedEffect().cloneNode().toElement();
//item->updateKeyframeEffect();
int diff = sceneRect().width() - m_projectDuration;
if (diff * newmatrix.m11() < 50) {
- if (newmatrix.m11() < 0.4) setSceneRect(0, 0, (m_projectDuration + 100 / newmatrix.m11()), sceneRect().height());
- else setSceneRect(0, 0, (m_projectDuration + 300), sceneRect().height());
+ if (newmatrix.m11() < 0.4)
+ setSceneRect(0, 0, (m_projectDuration + 100 / newmatrix.m11()), sceneRect().height());
+ else
+ setSceneRect(0, 0, (m_projectDuration + 300), sceneRect().height());
}
centerOn(QPointF(cursorPos(), verticalPos));
}
void CustomTrackView::slotRefreshGuides()
{
if (KdenliveSettings::showmarkers()) {
- for (int i = 0; i < m_guides.count(); i++) {
+ for (int i = 0; i < m_guides.count(); i++)
m_guides.at(i)->update();
- }
}
}
}
// add guides
- for (int i = 0; i < m_guides.count(); i++) {
+ for (int i = 0; i < m_guides.count(); i++)
m_searchPoints.append(m_guides.at(i)->info());
- }
qSort(m_searchPoints);
}
for (int i = 0; i < itemList.count(); i++) {
if (itemList.at(i)->type() == AVWIDGET) {
ClipItem *item = (ClipItem *)itemList.at(i);
- if (item->clipProducer() == clipId) {
+ if (item->clipProducer() == clipId)
matchingInfo << item->info();
- }
}
}
return matchingInfo;