return;
}
- AddTimelineClipCommand *command = new AddTimelineClipCommand(this, clip->toXML(), clip->getId(), pasteInfo, EffectsList(), m_scene->editMode() == OVERWRITEEDIT, m_scene->editMode() == INSERTEDIT, true, false);
- updateTrackDuration(pasteInfo.track, command);
- m_commandStack->push(command);
+ // Add refresh command for undo
+ QUndoCommand *addCommand = new QUndoCommand();
+ addCommand->setText(i18n("Add timeline clip"));
+ new RefreshMonitorCommand(this, false, true, addCommand);
+ new AddTimelineClipCommand(this, clip->toXML(), clip->getId(), pasteInfo, EffectsList(), m_scene->editMode() == OVERWRITEEDIT, m_scene->editMode() == INSERTEDIT, true, false, addCommand);
+ new RefreshMonitorCommand(this, true, false, addCommand);
+ updateTrackDuration(pasteInfo.track, addCommand);
+
+ m_commandStack->push(addCommand);
selectClip(true, false);
// Automatic audio split
ItemInfo clipinfo = item->info();
clipinfo.track = m_document->tracksCount() - clipinfo.track;
- bool success = m_document->renderer()->mltResizeClipEnd(clipinfo, info.endPos - info.startPos);
+ bool success = m_document->renderer()->mltResizeClipEnd(clipinfo, info.endPos - info.startPos, false);
if (success) {
item->resizeEnd((int) info.endPos.frames(m_document->fps()));
setDocumentModified();
QUndoCommand *addCommand = new QUndoCommand();
addCommand->setText(i18n("Add timeline clip"));
QList <ClipItem *> brokenClips;
+
+ // Add refresh command for undo
+ new RefreshMonitorCommand(this, false, true, addCommand);
for (int i = 0; i < items.count(); i++) {
ClipItem *item = static_cast <ClipItem *>(items.at(i));
}
item->setSelected(true);
}
+ // Add refresh command for redo
+ new RefreshMonitorCommand(this, false, false, addCommand);
+
qDeleteAll(brokenClips);
brokenClips.clear();
if (addCommand->childCount() > 0) m_commandStack->push(addCommand);
QList<QGraphicsItem *> selection = m_scene->items(r);
QUndoCommand *deleteTrack = new QUndoCommand();
deleteTrack->setText("Delete track");
+ new RefreshMonitorCommand(this, false, true, deleteTrack);
// Delete all clips in selected track
for (int i = 0; i < selection.count(); i++) {
}
new AddTrackCommand(this, ix, trackinfo, false, deleteTrack);
+ new RefreshMonitorCommand(this, true, false, deleteTrack);
m_commandStack->push(deleteTrack);
}