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

void UndoManager::addCommand ( const DolphinCommand command  ) 

Adds the command command to the undo list. The command can be undone by invoking UndoManager::undo().

Definition at line 73 of file undomanager.cpp.

References DolphinCommand::m_macroIndex, undoAvailable(), and undoTextChanged().

Referenced by Dolphin::addUndoOperation(), Dolphin::createFile(), Dolphin::createFolder(), DolphinView::rename(), and DolphinView::renameSelectedItems().


    if (m_recordMacro) {
        DolphinCommand macroCommand = command;
        macroCommand.m_macroIndex = m_macroCounter;
        m_history.insert(m_history.at(m_historyIndex), macroCommand);
    else {
        m_history.insert(m_history.at(m_historyIndex), command);

    emit undoAvailable(true);
    emit undoTextChanged(i18n("Undo: %1").arg(commandText(command)));

    // prevent an endless growing of the Undo history
    if (m_historyIndex > 10000) {

Generated by  Doxygen 1.6.0   Back to index