double y2;
// draw line showing default value
- if (isSelected()) {
+ bool active = isSelected() || (parentItem() && parentItem()->isSelected());
+ if (active) {
x1 = br.x();
x2 = br.right();
y1 = br.bottom() - m_keyframeDefault * maxh;
QLineF l(x1, y1, x2, y2);
l2 = painter->matrix().map(l);
painter->drawLine(l2);
- if (isSelected()) {
+ if (active) {
painter->fillRect(l2.x1() - 3, l2.y1() - 3, 6, 6, QBrush(color));
}
x1 = x2;
y1 = y2;
}
- if (isSelected()) painter->fillRect(l2.x2() - 3, l2.y2() - 3, 6, 6, QBrush(color));
+ if (active) painter->fillRect(l2.x2() - 3, l2.y2() - 3, 6, 6, QBrush(color));
}
int AbstractClipItem::mouseOverKeyFrames(QPointF pos)
for (int i = 0; i < itemList.count(); i++) {
if (itemList.at(i)->type() == AVWIDGET) {
ClipItem *item = static_cast <ClipItem *>(itemList.at(i));
+ if (effect.attribute("type") == "audio") {
+ // Don't add audio effects on video clips
+ if (item->isVideoOnly() || (item->clipType() != AUDIO && item->clipType() != AV && item->clipType() != PLAYLIST)) continue;
+ } else if (effect.hasAttribute("type") == false) {
+ // Don't add video effect on audio clips
+ if (item->isAudioOnly() || item->clipType() == AUDIO) continue;
+ }
+
if (item->hasEffect(effect.attribute("tag"), effect.attribute("id")) != -1 && effect.attribute("unique", "0") != "0") {
emit displayMessage(i18n("Effect already present in clip"), ErrorMessage);
continue;
for (int i = 0; i < itemList.count(); i++) {
if (itemList.at(i)->type() == AVWIDGET) {
ClipItem *item = (ClipItem *)itemList.at(i);
+ if (effect.attribute("type") == "audio") {
+ // Don't add audio effects on video clips
+ if (item->isVideoOnly() || (item->clipType() != AUDIO && item->clipType() != AV && item->clipType() != PLAYLIST)) continue;
+ } else if (effect.hasAttribute("type") == false) {
+ // Don't add video effect on audio clips
+ if (item->isAudioOnly() || item->clipType() == AUDIO) continue;
+ }
if (item->hasEffect(effect.attribute("tag"), effect.attribute("id")) != -1 && effect.attribute("unique", "0") != "0") {
emit displayMessage(i18n("Effect already present in clip"), ErrorMessage);
continue;