Commit 3ea13576 authored by Till Theato's avatar Till Theato
Browse files

Fix crash when hovering transitions

svn path=/trunk/kdenlive/; revision=4597
parent 35a5c83d
......@@ -571,23 +571,25 @@ void CustomTrackView::mouseMoveEvent(QMouseEvent * event)
setTipAnimation(clip, opMode, size);
if (opMode == MOVE) {
setCursor(Qt::OpenHandCursor);
ClipItem *ci = static_cast <ClipItem *>(item);
QString message = ci->clipName() + i18n(":");
message.append(i18n(" Position:") + m_document->timecode().getDisplayTimecode(ci->info().startPos, KdenliveSettings::frametimecode()));
message.append(i18n(" Duration:") + m_document->timecode().getDisplayTimecode(ci->cropDuration(), KdenliveSettings::frametimecode()));
if (clip->parentItem() && clip->parentItem()->type() == GROUPWIDGET) {
AbstractGroupItem *parent = static_cast <AbstractGroupItem *>(clip->parentItem());
if (clip->parentItem() == m_selectionGroup)
message.append(i18n(" Selection duration:"));
else
message.append(i18n(" Group duration:"));
message.append(m_document->timecode().getDisplayTimecode(parent->duration(), KdenliveSettings::frametimecode()));
if (parent->parentItem() && parent->parentItem()->type() == GROUPWIDGET) {
AbstractGroupItem *parent2 = static_cast <AbstractGroupItem *>(parent->parentItem());
message.append(i18n(" Selection duration:") + m_document->timecode().getDisplayTimecode(parent2->duration(), KdenliveSettings::frametimecode()));
if (item->type() == AVWIDGET) {
ClipItem *ci = static_cast <ClipItem *>(item);
QString message = ci->clipName() + i18n(":");
message.append(i18n(" Position:") + m_document->timecode().getDisplayTimecode(ci->info().startPos, KdenliveSettings::frametimecode()));
message.append(i18n(" Duration:") + m_document->timecode().getDisplayTimecode(ci->cropDuration(), KdenliveSettings::frametimecode()));
if (clip->parentItem() && clip->parentItem()->type() == GROUPWIDGET) {
AbstractGroupItem *parent = static_cast <AbstractGroupItem *>(clip->parentItem());
if (clip->parentItem() == m_selectionGroup)
message.append(i18n(" Selection duration:"));
else
message.append(i18n(" Group duration:"));
message.append(m_document->timecode().getDisplayTimecode(parent->duration(), KdenliveSettings::frametimecode()));
if (parent->parentItem() && parent->parentItem()->type() == GROUPWIDGET) {
AbstractGroupItem *parent2 = static_cast <AbstractGroupItem *>(parent->parentItem());
message.append(i18n(" Selection duration:") + m_document->timecode().getDisplayTimecode(parent2->duration(), KdenliveSettings::frametimecode()));
}
}
emit displayMessage(message, InformationMessage);
}
emit displayMessage(message, InformationMessage);
} else if (opMode == RESIZESTART) {
setCursor(KCursor("left_side", Qt::SizeHorCursor));
} else if (opMode == RESIZEEND) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment