changeset 53:7fcdc6df4853

* Create a new time instants layer if Enter is hit when there is no existing time instants layer present
author Chris Cannam
date Mon, 20 Mar 2006 18:34:16 +0000
parents d397ea0a79f5
children 709d63d90028
files base/CommandHistory.cpp
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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