- for (int i = 0; i < children.count(); i++) {
- if (children.at(i)->type() == AVWIDGET) {
- item = (ClipItem*) children.at(i);
- break;
- }
+ if (type == TRANSITIONWIDGET) {
+ // We want to import keyframes to a transition
+ if (!m_selectionGroup) {
+ emit displayMessage(i18n("You need to select one clip and one transition"), ErrorMessage);
+ return;
+ }
+ // Make sure there is no collision
+ QList<QGraphicsItem *> children = m_selectionGroup->childItems();
+ for (int i = 0; i < children.count(); i++) {
+ if (children.at(i)->type() == AVWIDGET) {
+ item = (ClipItem*) children.at(i);
+ break;
+ }
+ }