comparison base/CommandHistory.cpp @ 78:c983dda79f72

* Replace crash with warning when a transform could not be automatically re-run * More sensible default paths for Vamp plugin lookup (at least on Linux and OS/X) * A start to making the y coords for time value layers etc align * Set sensible y coords for text labels in time instant and value layers
author Chris Cannam
date Thu, 13 Apr 2006 18:29:10 +0000
parents 7fcdc6df4853
children 90ade4fa63be
comparison
equal deleted inserted replaced
77:2beca8ddcdc3 78:c983dda79f72
90 } 90 }
91 91
92 void 92 void
93 CommandHistory::clear() 93 CommandHistory::clear()
94 { 94 {
95 std::cerr << "CommandHistory::clear()" << std::endl; 95 // std::cerr << "CommandHistory::clear()" << std::endl;
96 closeBundle(); 96 closeBundle();
97 m_savedAt = -1; 97 m_savedAt = -1;
98 clearStack(m_undoStack); 98 clearStack(m_undoStack);
99 clearStack(m_redoStack); 99 clearStack(m_redoStack);
100 updateActions(); 100 updateActions();
129 return; 129 return;
130 } else if (m_currentBundle) { 130 } else if (m_currentBundle) {
131 closeBundle(); 131 closeBundle();
132 } 132 }
133 133
134 std::cerr << "CommandHistory::addCommand: " << command->getName().toLocal8Bit().data() << " at " << command << std::endl; 134 // std::cerr << "CommandHistory::addCommand: " << command->getName().toLocal8Bit().data() << " at " << command << std::endl;
135 135
136 // We can't redo after adding a command 136 // We can't redo after adding a command
137 std::cerr << "CommandHistory::clearing redo stack" << std::endl; 137 // std::cerr << "CommandHistory::clearing redo stack" << std::endl;
138 clearStack(m_redoStack); 138 clearStack(m_redoStack);
139 139
140 // can we reach savedAt? 140 // can we reach savedAt?
141 if ((int)m_undoStack.size() < m_savedAt) m_savedAt = -1; // nope 141 if ((int)m_undoStack.size() < m_savedAt) m_savedAt = -1; // nope
142 142
198 } 198 }
199 199
200 void 200 void
201 CommandHistory::addToCompound(Command *command) 201 CommandHistory::addToCompound(Command *command)
202 { 202 {
203 std::cerr << "CommandHistory::addToCompound: " << command->getName().toLocal8Bit().data() << std::endl; 203 // std::cerr << "CommandHistory::addToCompound: " << command->getName().toLocal8Bit().data() << std::endl;
204 204
205 if (m_executeCompound) command->execute(); 205 if (m_executeCompound) command->execute();
206 m_currentCompound->addCommand(command); 206 m_currentCompound->addCommand(command);
207 } 207 }
208 208
351 351
352 CommandStack tempStack; 352 CommandStack tempStack;
353 353
354 for (i = 0; i < limit; ++i) { 354 for (i = 0; i < limit; ++i) {
355 Command *command = stack.top(); 355 Command *command = stack.top();
356 std::cerr << "CommandHistory::clipStack: Saving recent command: " << command->getName().toLocal8Bit().data() << " at " << command << std::endl; 356 // std::cerr << "CommandHistory::clipStack: Saving recent command: " << command->getName().toLocal8Bit().data() << " at " << command << std::endl;
357 tempStack.push(stack.top()); 357 tempStack.push(stack.top());
358 stack.pop(); 358 stack.pop();
359 } 359 }
360 360
361 clearStack(stack); 361 clearStack(stack);