- QDropEvent * event)
-{
-/*
- m_dragging = false;
- m_startedClipMove = false;
- if (ClipDrag::canDecode(event)) {
- if (!m_selection.isEmpty()) {
- m_selection.setAutoDelete(true);
- m_selection.clear();
- m_selection.setAutoDelete(false);
- }
-
- if (m_addingClips) {
-
- m_app->addCommand(createAddClipsCommand(), true);
- m_addingClips = false;
- m_app->clipReferenceChanged();
-
- //if (m_firststep) m_document->activateSceneListGeneration(true);
- m_firststep = false;
- }
-
- if (m_deleteClipsCommand) {
- delete m_deleteClipsCommand;
- m_deleteClipsCommand = 0;
- }
-
- if (m_moveClipsCommand) {
- m_moveClipsCommand->setEndLocation(m_masterClip);
- if (!m_moveClipsCommand->doesMove())
- {
- //m_document->activateSceneListGeneration(true);
- moveSelectedClips(m_moveClipsCommand->startTrack(), m_moveClipsCommand->startTime());
- m_app->addCommand(m_moveClipsCommand, true);
- m_moveClipsCommand = 0;
- m_document->slotUpdateMonitorPlaytime();
- // KdenliveApp is now managing this command, we do not need to delete it.
- }
- else {
- m_document->activateSceneListGeneration(true, false);
- delete m_moveClipsCommand;
- m_moveClipsCommand = 0;
- }
- }
- event->accept();
- } else if (EffectDrag::canDecode(event)) {
- DocClipRef *clipUnderMouse = 0;
- DocumentTrack * panel =
- m_view->panelAt(event->pos().y());
- if (panel) {
- DocTrackBase *track =
- m_document->track(panel->documentTrackIndex());
- if (track) {
- GenTime mouseTime((int)(m_timeline->mapLocalToValue(event->pos().
- x())), m_document->framesPerSecond());
- clipUnderMouse = track->getClipAt(mouseTime);
- }
- }
-
- if (clipUnderMouse) {
- Effect *effect = EffectDrag::decode(m_document, event);
- if (effect) {
- m_app->
- addCommand(Command::KAddEffectCommand::
- appendEffect(m_document, clipUnderMouse, effect),
- true);
- if (effect->name() == i18n("Freeze")) m_app->getDocument()->emitCurrentClipPosition();
- } else {
- kdWarning() <<
- "EffectDrag::decode did not return an effect, ignoring drag drop..."
- << endl;
- }
- delete effect;
- }
- }
- m_timeline->stopScrollTimer();
- m_timeline->drawTrackViewBackBuffer();
-*/
+ QDropEvent * event) {
+ /*
+ m_dragging = false;
+ m_startedClipMove = false;
+ if (ClipDrag::canDecode(event)) {
+ if (!m_selection.isEmpty()) {
+ m_selection.setAutoDelete(true);
+ m_selection.clear();
+ m_selection.setAutoDelete(false);
+ }
+
+ if (m_addingClips) {
+
+ m_app->addCommand(createAddClipsCommand(), true);
+ m_addingClips = false;
+ m_app->clipReferenceChanged();
+
+ //if (m_firststep) m_document->activateSceneListGeneration(true);
+ m_firststep = false;
+ }
+
+ if (m_deleteClipsCommand) {
+ delete m_deleteClipsCommand;
+ m_deleteClipsCommand = 0;
+ }
+
+ if (m_moveClipsCommand) {
+ m_moveClipsCommand->setEndLocation(m_masterClip);
+ if (!m_moveClipsCommand->doesMove())
+ {
+ //m_document->activateSceneListGeneration(true);
+ moveSelectedClips(m_moveClipsCommand->startTrack(), m_moveClipsCommand->startTime());
+ m_app->addCommand(m_moveClipsCommand, true);
+ m_moveClipsCommand = 0;
+ m_document->slotUpdateMonitorPlaytime();
+ // KdenliveApp is now managing this command, we do not need to delete it.
+ }
+ else {
+ m_document->activateSceneListGeneration(true, false);
+ delete m_moveClipsCommand;
+ m_moveClipsCommand = 0;
+ }
+ }
+ event->accept();
+ } else if (EffectDrag::canDecode(event)) {
+ DocClipRef *clipUnderMouse = 0;
+ DocumentTrack * panel =
+ m_view->panelAt(event->pos().y());
+ if (panel) {
+ DocTrackBase *track =
+ m_document->track(panel->documentTrackIndex());
+ if (track) {
+ GenTime mouseTime((int)(m_timeline->mapLocalToValue(event->pos().
+ x())), m_document->framesPerSecond());
+ clipUnderMouse = track->getClipAt(mouseTime);
+ }
+ }
+
+ if (clipUnderMouse) {
+ Effect *effect = EffectDrag::decode(m_document, event);
+ if (effect) {
+ m_app->
+ addCommand(Command::KAddEffectCommand::
+ appendEffect(m_document, clipUnderMouse, effect),
+ true);
+ if (effect->name() == i18n("Freeze")) m_app->getDocument()->emitCurrentClipPosition();
+ } else {
+ kdWarning() <<
+ "EffectDrag::decode did not return an effect, ignoring drag drop..."
+ << endl;
+ }
+ delete effect;
+ }
+ }
+ m_timeline->stopScrollTimer();
+ m_timeline->drawTrackViewBackBuffer();
+ */