┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/undomanager.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2006-12-17 11:52:26 +0000
committerPeter Penz <[email protected]>2006-12-17 11:52:26 +0000
commitc28c72619cef1edaf6ca732d293b321f5ac220e5 (patch)
treea53099a9222e3c432e7f52d3623dfcfea8e3f5e5 /src/undomanager.cpp
parent3b4dfa2040c1e970ba6689bd7a874fab5f423e2d (diff)
Reanimated cut-, copy- and paste- functionality as preparation for moving to KonqUndoManager.
svn path=/trunk/playground/utils/dolphin/; revision=614325
Diffstat (limited to 'src/undomanager.cpp')
-rw-r--r--src/undomanager.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/undomanager.cpp b/src/undomanager.cpp
index e6946cfe3..30e0dba35 100644
--- a/src/undomanager.cpp
+++ b/src/undomanager.cpp
@@ -76,13 +76,15 @@ void UndoManager::addCommand(const DolphinCommand& command)
{
++m_historyIndex;
+ QList<DolphinCommand>::iterator it = m_history.begin();
+ it += m_historyIndex;
if (m_recordMacro) {
DolphinCommand macroCommand = command;
macroCommand.m_macroIndex = m_macroCounter;
- m_history.insert(m_history.at(m_historyIndex), macroCommand);
+ m_history.insert(it, macroCommand);
}
else {
- m_history.insert(m_history.at(m_historyIndex), command);
+ m_history.insert(it, command);
}
emit undoAvailable(true);
@@ -125,7 +127,7 @@ void UndoManager::undo(DolphinMainWindow* mainWindow)
calcStepsCount(macroCount, progressCount);
/*
- * KDE4, ### TODO Only here to avoid possible crash
+ * KDE4, ### TODO Only here to avoid possible crash
*/
ProgressIndicator progressIndicator(mainWindow, i18n("Executing undo operation..."),
i18n("Executed undo operation."),