Logo Search packages:      
Sourcecode: kdenlive version File versions  Download package

bool KdenliveDoc::moveSelectedClips ( GenTime  startOffset,
int  trackOffset 
)

Moves the currectly selected clips by the offsets specified, or returns false if this is not possible.

Moves the currectly selected clips by the offsets specified, or returns false if this is not possible.

Definition at line 288 of file kdenlivedoc.cpp.

References hasBeenModified(), hasSelectedClips(), m_projectClip, DocClipProject::moveSelectedClips(), selectedClip(), and timelineClipUpdated().

Referenced by Command::KMoveClipsCommand::execute(), TrackPanelSpacerFunction::mouseMoved(), TrackPanelClipSlipFunction::moveSelectedClips(), TrackPanelClipMoveFunction::moveSelectedClips(), Gui::KdenliveApp::slotRemoveSpace(), and Command::KMoveClipsCommand::unexecute().

{
    int clipNumber = hasSelectedClips();
    GenTime start, end;
    DocClipRef * clip = NULL;
    if (clipNumber == 1) {
      clip = selectedClip();
      if (startOffset < GenTime(0)) {
          start = clip->trackStart() + startOffset;
          end = clip->trackEnd();
      }
      else {
          start = clip->trackStart();
          end = clip->trackEnd() + startOffset;
      }
    }
    bool result = m_projectClip->moveSelectedClips(startOffset, trackOffset);

    if (result) {
      hasBeenModified();
      if (clipNumber > 1) emit timelineClipUpdated();
      else {
          emit refreshCurrentClipTrack(clip->trackNum(), trackOffset, start, end);
      }
    }
    return result;
}


Generated by  Doxygen 1.6.0   Back to index