- 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);