# HG changeset patch # User Chris Cannam # Date 1142879656 0 # Node ID 7fcdc6df48532a0a6a20525019ca69795b610845 # Parent d397ea0a79f53dc4d3c0fc668a0f8a8a68d700b3 * Create a new time instants layer if Enter is hit when there is no existing time instants layer present diff -r d397ea0a79f5 -r 7fcdc6df4853 base/CommandHistory.cpp --- a/base/CommandHistory.cpp Mon Mar 20 15:10:07 2006 +0000 +++ b/base/CommandHistory.cpp Mon Mar 20 18:34:16 2006 +0000 @@ -227,13 +227,16 @@ std::cerr << "CommandHistory::endCompoundOperation: ERROR: no compound operation in progress!" << std::endl; } - Command *toAdd = m_currentCompound; + MacroCommand *toAdd = m_currentCompound; m_currentCompound = 0; - // We don't execute the macro command here, because we have been - // executing the individual commands as we went along if - // m_executeCompound was true. - addCommand(toAdd, false); + if (toAdd->haveCommands()) { + + // We don't execute the macro command here, because we have + // been executing the individual commands as we went along if + // m_executeCompound was true. + addCommand(toAdd, false); + } } void