Mercurial > hg > svgui
comparison widgets/CommandHistory.cpp @ 503:133b378d8efe
* more activity updates
author | Chris Cannam |
---|---|
date | Tue, 24 Feb 2009 16:44:43 +0000 |
parents | 73a58a4dfebd |
children | 4ba0476ebbb6 |
comparison
equal
deleted
inserted
replaced
502:73a58a4dfebd | 503:133b378d8efe |
---|---|
33 #include <QTimer> | 33 #include <QTimer> |
34 #include <QAction> | 34 #include <QAction> |
35 | 35 |
36 #include <iostream> | 36 #include <iostream> |
37 | 37 |
38 //#define DEBUG_COMMAND_HISTORY 1 | 38 #include <typeinfo> |
39 | |
40 #define DEBUG_COMMAND_HISTORY 1 | |
39 | 41 |
40 CommandHistory *CommandHistory::m_instance = 0; | 42 CommandHistory *CommandHistory::m_instance = 0; |
41 | 43 |
42 CommandHistory::CommandHistory() : | 44 CommandHistory::CommandHistory() : |
43 m_undoLimit(50), | 45 m_undoLimit(50), |
139 CommandHistory::addCommand(Command *command, bool execute, bool bundle) | 141 CommandHistory::addCommand(Command *command, bool execute, bool bundle) |
140 { | 142 { |
141 if (!command) return; | 143 if (!command) return; |
142 | 144 |
143 #ifdef DEBUG_COMMAND_HISTORY | 145 #ifdef DEBUG_COMMAND_HISTORY |
144 std::cerr << "CommandHistory::addCommand: " << command->getName().toLocal8Bit().data() << " at " << command << ": execute = " << execute << ", bundle = " << bundle << " (m_currentCompound = " << m_currentCompound << ", m_currentBundle = " << m_currentBundle << ")" << std::endl; | 146 std::cerr << "CommandHistory::addCommand: " << command->getName().toLocal8Bit().data() << " of type " << typeid(*command).name() << " at " << command << ": execute = " << execute << ", bundle = " << bundle << " (m_currentCompound = " << m_currentCompound << ", m_currentBundle = " << m_currentBundle << ")" << std::endl; |
145 #endif | 147 #endif |
146 | 148 |
147 if (m_currentCompound) { | 149 if (m_currentCompound) { |
148 addToCompound(command, execute); | 150 addToCompound(command, execute); |
149 return; | 151 return; |