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

void RosegardenGUIApp::slotEditPaste (  )  [slot]

paste the clipboard into the document

Definition at line 2400 of file rosegardengui.cpp.

References MultiViewCommandHistory::addCommand(), RosegardenGUIDoc::getCommandHistory(), RosegardenGUIDoc::getComposition(), Rosegarden::Clipboard::isEmpty(), m_doc, and RosegardenGUIDoc::slotSetPointerPosition().

Referenced by setupActions().

{
    if (m_clipboard->isEmpty()) {
        KTmpStatusMsg msg(i18n("Clipboard is empty"), this);
        return;
    }
    KTmpStatusMsg msg(i18n("Inserting clipboard contents..."), this);

    // for now, but we could paste at the time of the first copied
    // segment and then do ghosting drag or something
    timeT insertionTime = m_doc->getComposition().getPosition();
    m_doc->getCommandHistory()->addCommand
        (new PasteSegmentsCommand(&m_doc->getComposition(),
                                  m_clipboard, insertionTime,
                          m_doc->getComposition().getSelectedTrack(),
                          false));

    // User preference? Update song pointer position on paste
    m_doc->slotSetPointerPosition(m_doc->getComposition().getPosition());
}


Generated by  Doxygen 1.6.0   Back to index